refactor: ticking change snaps position
This commit is contained in:
parent
d09da37dc7
commit
9353a91012
|
@ -96,6 +96,11 @@ class PositionedBase extends Trait {
|
||||||
listeners() {
|
listeners() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
isTickingChanged: () => {
|
||||||
|
// Snap position on ticking change.
|
||||||
|
this._position = this.serverPosition;
|
||||||
|
},
|
||||||
|
|
||||||
tick: (elapsed) => {
|
tick: (elapsed) => {
|
||||||
if (!this.serverPositionDirty) {
|
if (!this.serverPositionDirty) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user