Skip to content

Commit

Permalink
Fixed panning input lag mention in InfiniteAmmoInc#62
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikki Lombardo committed Jun 12, 2018
1 parent e533528 commit 7e22385
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/js/classes/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var App = function(name, version)
0
];
this.shifted = false;
this.isNwjs = false;
this.isNwjs = false;

this.UPDATE_ARROWS_THROTTLE_MS = 25;

Expand Down Expand Up @@ -151,7 +151,6 @@ var App = function(name, version)

if (dragging)
{
//if(e.ctrlKey)
if (e.altKey || e.button === 1)
{
//prevents jumping straight back to standard dragging
Expand All @@ -163,15 +162,16 @@ var App = function(name, version)
}
else
{
/*
self.transformOrigin[0] += e.pageX - offset.x;
self.transformOrigin[1] += e.pageY - offset.y;
self.translate();
offset.x = e.pageX;
offset.y = e.pageY;
*/

/*
var nodes = self.nodes();
for (var i in nodes)
{
Expand All @@ -180,7 +180,6 @@ var App = function(name, version)
}
offset.x = e.pageX;
offset.y = e.pageY;
*/
}
}
else
Expand All @@ -189,7 +188,7 @@ var App = function(name, version)

var scale = self.cachedScale;

if(e.pageX > offset.x && e.pageY < offset.y)
if(e.pageX > offset.x && e.pageY < offset.y)
{
MarqRect.x1 = offset.x;
MarqRect.y1 = e.pageY;
Expand All @@ -215,7 +214,7 @@ var App = function(name, version)
MarqRect.x1 = e.pageX;
MarqRect.y1 = offset.y;
MarqRect.x2 = offset.x;
MarqRect.y2 = e.pageY;
MarqRect.y2 = e.pageY;
}

$("#marquee").css({ x:MarqRect.x1,
Expand Down

0 comments on commit 7e22385

Please sign in to comment.