Skip to content

Commit

Permalink
Merge pull request #64 from T045T/devel
Browse files Browse the repository at this point in the history
multi-touch zooming: consider movement along X and Y axis
  • Loading branch information
rctoris committed May 22, 2014
2 parents d90e6bd + add941d commit b576987
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/visualization/interaction/OrbitControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ROS3D.OrbitControls = function(options) {
}

/**
* Handle the movemove 3D event.
* Handle the mousemove 3D event.
*
* @param event3D - the 3D event to handle
*/
Expand Down Expand Up @@ -280,7 +280,7 @@ ROS3D.OrbitControls = function(options) {
zoomEnd.set((event.changedTouches[0].pageX - event.changedTouches[1].pageX)*(event.changedTouches[0].pageX - event.changedTouches[1].pageX), (event.changedTouches[0].pageY - event.changedTouches[1].pageY)*(event.changedTouches[0].pageY - event.changedTouches[1].pageY));
zoomDelta.subVectors(zoomEnd, zoomStart);

if (zoomDelta.y > 0) {
if (zoomDelta.y + zoomDelta.x > 0) {
that.zoomOut();
} else {
that.zoomIn();
Expand Down

0 comments on commit b576987

Please sign in to comment.