Clear mouseDown state if over scrollbar

Clicking on scrollbar to scroll content set the mouseDown state to true
This wasn't being reset on mouse up and moving mouse pointer towards the
edge of the file manager enabled resizing of width
Now on going beyond editor width (-scrollbar of 20px), sets mouseDown to
false
This commit is contained in:
Matt Pass
2012-10-23 15:57:50 +01:00
parent 5517bf80f9
commit 2bb0a361aa

View File

@@ -1038,7 +1038,7 @@ var ICEcoder = {
// Get the mouse position on demand
getMouseXY: function(e,area) {
var tempX, tempY, scrollTop;
var tempX, tempY, scrollTop, winW;
top.ICEcoder.mouseX = e.pageX ? e.pageX : e.clientX + document.body.scrollLeft;
top.ICEcoder.mouseY = e.pageY ? e.pageY : e.clientY + document.body.scrollTop;
@@ -1049,6 +1049,8 @@ var ICEcoder = {
if (area=="editor") {
top.ICEcoder.mouseX += top.ICEcoder.filesW;
}
winW = window.innerWidth ? window.innerWidth : document.body.clientWidth;
if (top.ICEcoder.mouseX > (winW-20)) {top.ICEcoder.mouseDown=false};
top.ICEcoder.dragCursorTest();
},