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

Removed MIDDLE_DOUBLE_CLICK and RIGHT_DOUBLE_CLICK #5052

Merged
merged 2 commits into from
Mar 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Change Log
* `ArcGisImageServerTerrainProvider` will be removed in 1.32 due to missing TIFF support in web browsers.
* Breaking changes
* Corrected spelling of `Color.FUCHSIA` from `Color.FUSCHIA`. [#4977](https:/AnalyticalGraphicsInc/cesium/pull/4977)
* The enums `MIDDLE_DOUBLE_CLICK` and `RIGHT_DOUBLE_CLICK` from `ScreenSpaceEventType` have been removed. [#5052](https:/AnalyticalGraphicsInc/cesium/pull/5052)
* Added support to `DebugCameraPrimitive` to draw multifrustum planes. The attribute `debugShowFrustumPlanes` of `Scene` and `frustumPlanes` of `CesiumInspector` toggles this. `FrameState` has been augmented to include `frustumSplits` which is a `Number[]` of the near/far planes of the camera frustums.
* Enable rendering `GroundPrimitives` on hardware without the `EXT_frag_depth` extension; however, this could cause artifacts for certain viewing angles.
* Always outline KML line extrusions so that they show up properly in 2D and other straight down views.
Expand Down
20 changes: 0 additions & 20 deletions Source/Core/ScreenSpaceEventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ define([
'./Cartesian2',
'./defaultValue',
'./defined',
'./deprecationWarning',
'./destroyObject',
'./DeveloperError',
'./FeatureDetection',
Expand All @@ -16,7 +15,6 @@ define([
Cartesian2,
defaultValue,
defined,
deprecationWarning,
destroyObject,
DeveloperError,
FeatureDetection,
Expand Down Expand Up @@ -272,10 +270,6 @@ define([
var screenSpaceEventType;
if (button === MouseButton.LEFT) {
screenSpaceEventType = ScreenSpaceEventType.LEFT_DOUBLE_CLICK;
} else if (button === MouseButton.MIDDLE) {
screenSpaceEventType = ScreenSpaceEventType.MIDDLE_DOUBLE_CLICK;
} else if (button === MouseButton.RIGHT) {
screenSpaceEventType = ScreenSpaceEventType.RIGHT_DOUBLE_CLICK;
} else {
return;
}
Expand Down Expand Up @@ -686,14 +680,6 @@ define([
registerListeners(this);
}

function checkForDoubleClick(type) {
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.');
}
}

/**
* Set a function to be executed on an input event.
*
Expand All @@ -715,8 +701,6 @@ define([
}
//>>includeEnd('debug');

checkForDoubleClick(type);

var key = getInputEventKey(type, modifier);
this._inputEvents[key] = action;
};
Expand All @@ -738,8 +722,6 @@ define([
}
//>>includeEnd('debug');

checkForDoubleClick(type);

var key = getInputEventKey(type, modifier);
return this._inputEvents[key];
};
Expand All @@ -761,8 +743,6 @@ define([
}
//>>includeEnd('debug');

checkForDoubleClick(type);

var key = getInputEventKey(type, modifier);
delete this._inputEvents[key];
};
Expand Down
20 changes: 0 additions & 20 deletions Source/Core/ScreenSpaceEventType.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@ define([
*/
RIGHT_CLICK : 7,

/**
* Represents a mouse right double click event.
*
* @type {Number}
* @constant
*
* @deprecated
*/
RIGHT_DOUBLE_CLICK : 8,

/**
* Represents a mouse middle button down event.
*
Expand All @@ -101,16 +91,6 @@ define([
*/
MIDDLE_CLICK : 12,

/**
* Represents a mouse middle double click event.
*
* @type {Number}
* @constant
*
* @deprecated
*/
MIDDLE_DOUBLE_CLICK : 13,

/**
* Represents a mouse move event.
*
Expand Down
4 changes: 2 additions & 2 deletions Specs/Core/ScreenSpaceEventHandlerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ defineSuite([
expect(action).not.toHaveBeenCalled();
}

var possibleButtons = [MouseButton.LEFT, MouseButton.MIDDLE, MouseButton.RIGHT];
var possibleButtons = [MouseButton.LEFT];
var possibleModifiers = [undefined, KeyboardEventModifier.SHIFT, KeyboardEventModifier.CTRL, KeyboardEventModifier.ALT];
var possibleEventTypes = [ScreenSpaceEventType.LEFT_DOUBLE_CLICK, ScreenSpaceEventType.MIDDLE_DOUBLE_CLICK, ScreenSpaceEventType.RIGHT_DOUBLE_CLICK];
var possibleEventTypes = [ScreenSpaceEventType.LEFT_DOUBLE_CLICK];
createAllMouseSpecCombinations(testMouseDoubleClickEvent, possibleButtons, possibleModifiers, possibleEventTypes);
});

Expand Down