Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate MIDDLE_DOUBLE_CLICK and RIGHT_DOUBLE_CLICK events #4910

Merged
merged 3 commits into from
Jan 24, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Change Log
* Deprecated
* The properties `url` and `key` will be removed from `GeocoderViewModel` in 1.31. These properties will be available on geocoder services that support them, like `BingMapsGeocoderService`.
* The function `createBinormalAndBitangent` of `GeometryPipeline` will be removed in 1.31. Use the function `createTangentAndBitangent` instead. [#4856](https://github.com/AnalyticalGraphicsInc/cesium/pull/4856)
* The enums `LEFT_DOUBLE_CLICK`, `MIDDLE_DOUBLE_CLICK`, and `RIGHT_MIDDLE_CLICK` from `ScreenSpaceEventType` have been deprecated and will be removed in 1.31. [#2631](https://github.com/AnalyticalGraphicsInc/cesium/issues/2631)
* The enums `MIDDLE_DOUBLE_CLICK` and `RIGHT_MIDDLE_CLICK` from `ScreenSpaceEventType` have been deprecated and will be removed in 1.31. [#4910](https://github.com/AnalyticalGraphicsInc/cesium/pull/4910)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIGHT_MIDDLE_CLICK ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... fixed.

* Breaking changes
* Removed separate `heading`, `pitch`, `roll` parameters from `Transform.headingPitchRollToFixedFrame` and `Transform.headingPitchRollQuaternion`. Pass a `headingPitchRoll` object instead. [#4843](https://github.com/AnalyticalGraphicsInc/cesium/pull/4843)
* The property `binornmal` has been renamed to `bitangent` for `Geometry` and `VertexFormat`. [#4856](https://github.com/AnalyticalGraphicsInc/cesium/pull/4856)
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/ScreenSpaceEventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,10 @@ define([
}

function checkForDoubleClick(type) {
if (type === ScreenSpaceEventType.LEFT_DOUBLE_CLICK ||
type === ScreenSpaceEventType.MIDDLE_DOUBLE_CLICK ||
type === ScreenSpaceEventType.RIGHT_DOUBLE_CLICK) {
deprecationWarning('Double Click', 'ScreenSpaceEventType.LEFT_DOUBLE_CLICK, ScreenSpaceEventType.MIDDLE_CLICK, and ScreenSpaceEventType.RIGHT_CLICK were deprecated in Cesium 1.30. They will be removed in 1.31.');
if (type === ScreenSpaceEventType.MIDDLE_DOUBLE_CLICK) {
deprecationWarning('MIDDLE_DOUBLE_CLICK', 'ScreenSpaceEventType.MIDDLE_DOUBLE_CLICK was deprecated in Cesium 1.30. It will be removed in 1.31.');
} else if (type === ScreenSpaceEventType.RIGHT_DOUBLE_CLICK) {
deprecationWarning('RIGHT_DOUBLE_CLICK', 'ScreenSpaceEventType.RIGHT_DOUBLE_CLICK was deprecated in Cesium 1.30. It will be removed in 1.31.');
}
}

Expand Down
4 changes: 1 addition & 3 deletions Source/Core/ScreenSpaceEventType.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define([
'use strict';

/**
* This enumerated type is for classifying mouse events: down, up, click, move and move while a button is held down.
* This enumerated type is for classifying mouse events: down, up, click, double click, move and move while a button is held down.
*
* @exports ScreenSpaceEventType
*/
Expand Down Expand Up @@ -40,8 +40,6 @@ define([
*
* @type {Number}
* @constant
*
* @deprecated
*/
LEFT_DOUBLE_CLICK : 3,

Expand Down
4 changes: 2 additions & 2 deletions Source/Widgets/Viewer/Viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
}

cesiumWidget.screenSpaceEventHandler.setInputAction(pickAndSelectObject, ScreenSpaceEventType.LEFT_CLICK);
cesiumWidget.screenSpaceEventHandler.setInputAction(pickAndTrackObject, ScreenSpaceEventType.MIDDLE_CLICK);
cesiumWidget.screenSpaceEventHandler.setInputAction(pickAndTrackObject, ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
}

defineProperties(Viewer.prototype, {
Expand Down Expand Up @@ -1370,7 +1370,7 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
var i;

this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType.LEFT_CLICK);
this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType.MIDDLE_CLICK);
this.screenSpaceEventHandler.removeInputAction(ScreenSpaceEventType.LEFT_DOUBLE_CLICK);

// Unsubscribe from data sources
var dataSources = this.dataSources;
Expand Down