Created
February 26, 2014 16:58
-
-
Save loktar00/9233624 to your computer and use it in GitHub Desktop.
Perf Improvement for answer http://stackoverflow.com/questions/20452317/jquery-droppable-iframe-offset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// perf improvement for answer http://stackoverflow.com/questions/20452317/jquery-droppable-iframe-offset | |
var $scrollParent = m[i].element.closest("html,body"); | |
m[i].offset.top -= $scrollParent.scrollTop(); | |
m[i].offset.left -= $scrollParent.scrollLeft(); | |
// iframe positioning | |
if (this.current.options.iframeOffset) { | |
m[i].offset.top += this.current.options.iframeOffset.top; | |
m[i].offset.left += this.current.options.iframeOffset.left; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment