naver / egjs

Javascript components group that brings easiest and fastest way to build a web application in your way.
https://naver.github.io/egjs
Other
935 stars 80 forks source link

flicking has wrong position on disableInput mode #433

Closed sculove closed 7 years ago

sculove commented 7 years ago

Description

flicking should set position when resizing.

Steps to check or reproduce

  1. call disableInput method.
  2. rotate window
  3. call resize method.
netil commented 7 years ago

Why this occurs

disable/enable are implemented via changing event bindings.

When .disableInput() is called, all of MovableCoords's event binds are unbinded and .resize() adjust panel's position using MovableCoords's method, which can't not handle because all event binds are gone.

Todo

Modify .disableInput() and .enableInput() in other way rather than handling with event binds.

netil commented 7 years ago

The only and easiest way to do without handling event biding, is calling MovableCoord's ._setInterrupt() method.

But, internally after changes(animation or coord moves) happens, it changes calling this._setInterrupt(false);

Is kind of duplicated call, but to be worked as expected, it needed to call ._setInterrupt() regardless MovableCoord's call.

netil commented 7 years ago

It's not good idea approaching via private method. It'll be better implement disableInput/enableInput API in MovableCoord component

sculove commented 7 years ago

@netil I agree it. I will handle it in MovableCoord. Thanks