Closed ZwaarContrast closed 9 years ago
this isn't really needed anymore since you can just access the current instance within the moved function ie:
moved: function() { console.log(this.scrollLeft()); }
good spot that the docs are outdated though
Alright, didn't know that I could access the instance from inside the callback. Good call, thanks!
no worries, i've updated the docs :smile:
I propose implementing a system where the listeners for moved and stopped return the current scroll position.
Can probably by realised by changing
Kinetic.prototype.stop
and change the linethis.settings.stopped.call(this);
tothis.settings.stopped.call(this,settings,{left: this.scrollLeft(),top: this.scrollTop());
According to the current documentation the stopped function also returns the settings, which it doesn't. It does work as documented in the moved function. This is fixed in the above mentioned change.
Should also be changed in
Kinetic.prototype._move
. Changesettings.moved.call(this, settings);
tothis.settings.moved.call(this,settings,{left: this.scrollLeft(),top: this.scrollTop());