Archived
1
0
This commit is contained in:
Jeff
2016-05-03 14:08:58 -04:00
parent 9f55486107
commit 9aca55ec71
2 changed files with 5 additions and 5 deletions

View File

@@ -379,16 +379,16 @@ function init(prefix) {
e.addEventListener("dragstart", function(ev) {
console.log(ev);
mouseDownX = ev.screenX;
mouseDownY = ev.screenY;
mouseDownX = ev.clientX;
mouseDownY = ev.clientY;
if(!ev.shiftKey) {
ev.preventDefault();
}
}, false);
e.addEventListener("dragend", function(ev) {
var dx = ox + ev.screenX - mouseDownX;
var dy = oy + ev.screenY - mouseDownY;
var dx = ox + ev.clientX - mouseDownX;
var dy = oy + ev.clientY - mouseDownY;
console.log(ox, oy, dx, dy);
rpl.translate(dx, dy);