There is an issue with correct context loss in onGet(). "this" begins to point to last item when you do this.stickit() in multiple views with "classes: {}" configured.
The problem is in initializeClasses() and its updateClass() subroutine, where classConfig.view = config.view is defined outside and then used inside updateClass(). Looks like classConfig.view is being "overwritten" in each iteration by next view's .stickit() call.
classConfig is passed to getAttr(), where applyViewFn.call(view, config.onGet, val, config) is done.
This results in "this" in onGet() pointing to last "view" passed through initializeClasses().
I fixed this by moving classConfig.view = config.view into updateClass().
Hi,
There is an issue with correct context loss in onGet(). "this" begins to point to last item when you do this.stickit() in multiple views with "classes: {}" configured.
The problem is in initializeClasses() and its updateClass() subroutine, where classConfig.view = config.view is defined outside and then used inside updateClass(). Looks like classConfig.view is being "overwritten" in each iteration by next view's .stickit() call.
classConfig is passed to getAttr(), where applyViewFn.call(view, config.onGet, val, config) is done. This results in "this" in onGet() pointing to last "view" passed through initializeClasses().
I fixed this by moving classConfig.view = config.view into updateClass().
If you need further details, please, let me know.
Google Chrome 66.0.3359.139 64bit, if relevant.
Thanks.