feat: initialFollow
This commit is contained in:
parent
c5dbadb66e
commit
e0df54248e
|
@ -28,6 +28,11 @@ export default (flecks) => class Followed extends Trait {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
initialFollow() {
|
||||||
|
this.updatePosition();
|
||||||
|
this.onRoomSizeChanged();
|
||||||
|
}
|
||||||
|
|
||||||
listeners() {
|
listeners() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
@ -45,8 +50,17 @@ export default (flecks) => class Followed extends Trait {
|
||||||
this.$$camera = json.camera;
|
this.$$camera = json.camera;
|
||||||
}
|
}
|
||||||
this.$$camera.viewSize = this.params.viewSize;
|
this.$$camera.viewSize = this.params.viewSize;
|
||||||
this.updatePosition();
|
this.initialFollow();
|
||||||
this.onRoomSizeChanged();
|
}
|
||||||
|
|
||||||
|
methods() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
initialFollow: () => {
|
||||||
|
this.initialFollow();
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
onRoomSizeChanged() {
|
onRoomSizeChanged() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user