Tutorial :How to avoid “Position.includeScrollOffsets = true;”?


I'm using scriptaculous to enable Drag&Drop (using Sortables) for components within a CMS. To ensure that even long component list (with scrolling) can be used without side-effects I had to set Position.includeScrollOffsets = true;. The problem is that other parts of the CMS (which I can't modify easily) break due to this setting. (Their calls to Position.within(obj, this.mousePos.X, this.mousePos.Y) return wrong values once the "includeScrollOffsets" is used)....

Is there any way to avoid this statement and still get the Sortables to work as supposed?



Adding a "Position.prepare();" right after the "Position.includeScrollOffsets = true;" did the job. - Hope this is a help for others ~~

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »