How to avoid "Position.includeScrollOffsets = true;"?
I'm using scriptaculous to enable D开发者_开发问答rag&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?
Cheers
Adding a "Position.prepare();" right after the "Position.includeScrollOffsets = true;" did the job. - Hope this is a help for others ~~
精彩评论