1
0
mirror of synced 2025-02-09 16:49:24 +03:00

optimize mousemove listener. fixes #1328

This commit is contained in:
Igor Vaynberg 2013-05-17 08:13:31 -07:00
parent 38f6b2bd71
commit 70f1b29882

View File

@ -47,7 +47,7 @@ the specific language governing permissions and limitations under the Apache Lic
}
var KEY, AbstractSelect2, SingleSelect2, MultiSelect2, nextUid, sizer,
lastMousePosition, $document, scrollBarDimensions,
lastMousePosition={x:0,y:0}, $document, scrollBarDimensions,
KEY = {
TAB: 9,
@ -172,7 +172,8 @@ the specific language governing permissions and limitations under the Apache Lic
}
$document.on("mousemove", function (e) {
lastMousePosition = {x: e.pageX, y: e.pageY};
lastMousePosition.x = e.pageX;
lastMousePosition.y = e.pageY;
});
/**