Skip to content

Commit

Permalink
Merge pull request #4518 from simcur/feature/ios-gestures
Browse files Browse the repository at this point in the history
Prevent default 'pinch' behavior on touch devices.
  • Loading branch information
Hannah committed Oct 25, 2016
2 parents c4449e2 + f7993be commit 4867f66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Change Log
* `HeadingPitchRoll.equals` and `HeadingPitchRoll.equalsEpsilon` functions for comparing two instances.
* Added `Matrix3.fromHeadingPitchRoll` Computes a 3x3 rotation matrix from the provided headingPitchRoll.
* `Transforms.headingPitchRollToFixedFrame` and `Transforms.headingPitchRollQuaternion` now take a `HeadingPitchRoll` object in addition to separate heading, pitch, and roll values. Separate values will be deprecated in 1.30.
* Prevent execution of default device/browser behaviour when handling "pinch" touch event/gesture.
* Fixed a crash when zooming from touch input on viewer initialization. [#4177](https://github.com/AnalyticalGraphicsInc/cesium/issues/4177)

### 1.26 - 2016-10-03
Expand Down
4 changes: 4 additions & 0 deletions Source/Core/ScreenSpaceEventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ define([
Cartesian2.clone(positions.values[1], touch2StartEvent.position2);

action(touch2StartEvent);

// Touch-enabled devices, in particular iOS can have many default behaviours for
// "pinch" events, which can still be executed unless we prevent them here.
event.preventDefault();
}
}
}
Expand Down

0 comments on commit 4867f66

Please sign in to comment.