Add ol/pixel module for Pixel type

This commit is contained in:
Tim Schaub
2018-07-19 10:17:00 -06:00
parent f77b6be8e9
commit e5493d1288
21 changed files with 43 additions and 43 deletions
+6 -6
View File
@@ -11,9 +11,9 @@ import RenderBox from '../render/Box.js';
/**
* A function that takes a {@link module:ol/MapBrowserEvent} and two
* {@link module:ol~Pixel}s and returns a `{boolean}`. If the condition is met,
* {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,
* true should be returned.
* @typedef {function(this: ?, module:ol/MapBrowserEvent, module:ol~Pixel, module:ol~Pixel):boolean} EndCondition
* @typedef {function(this: ?, module:ol/MapBrowserEvent, module:ol/pixel~Pixel, module:ol/pixel~Pixel):boolean} EndCondition
*/
@@ -26,7 +26,7 @@ import RenderBox from '../render/Box.js';
* @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default
* `boxEndCondition` function.
* @property {module:ol/interaction/DragBox~EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
* {@link module:ol~Pixel}s to indicate whether a `boxend` event should be fired.
* {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.
* Default is `true` if the area of the box is bigger than the `minArea` option.
* @property {function(this:module:ol/interaction/DragBox, module:ol/MapBrowserEvent)} onBoxEnd Code to execute just
* before `boxend` is fired.
@@ -143,7 +143,7 @@ class DragBox extends PointerInteraction {
this.onBoxEnd_ = options.onBoxEnd ? options.onBoxEnd : UNDEFINED;
/**
* @type {module:ol~Pixel}
* @type {module:ol/pixel~Pixel}
* @private
*/
this.startPixel_ = null;
@@ -178,8 +178,8 @@ class DragBox extends PointerInteraction {
* should fire.
* @param {module:ol/MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent
* leading to the box end.
* @param {module:ol~Pixel} startPixel The starting pixel of the box.
* @param {module:ol~Pixel} endPixel The end pixel of the box.
* @param {module:ol/pixel~Pixel} startPixel The starting pixel of the box.
* @param {module:ol/pixel~Pixel} endPixel The end pixel of the box.
* @return {boolean} Whether or not the boxend condition should be fired.
* @this {module:ol/interaction/DragBox}
*/
+1 -1
View File
@@ -45,7 +45,7 @@ class DragPan extends PointerInteraction {
this.kinetic_ = options.kinetic;
/**
* @type {module:ol~Pixel}
* @type {module:ol/pixel~Pixel}
*/
this.lastCentroid = null;
+1 -1
View File
@@ -176,7 +176,7 @@ class Draw extends PointerInteraction {
this.shouldHandle_ = false;
/**
* @type {module:ol~Pixel}
* @type {module:ol/pixel~Pixel}
* @private
*/
this.downPx_ = null;
+1 -1
View File
@@ -177,7 +177,7 @@ class ExtentInteraction extends PointerInteraction {
}
/**
* @param {module:ol~Pixel} pixel cursor location
* @param {module:ol/pixel~Pixel} pixel cursor location
* @param {module:ol/PluggableMap} map map
* @returns {module:ol/coordinate~Coordinate|null} snapped vertex on extent
* @private
+2 -2
View File
@@ -209,7 +209,7 @@ class Modify extends PointerInteraction {
this.vertexSegments_ = null;
/**
* @type {module:ol~Pixel}
* @type {module:ol/pixel~Pixel}
* @private
*/
this.lastPixel_ = [0, 0];
@@ -668,7 +668,7 @@ class Modify extends PointerInteraction {
}
/**
* @param {module:ol~Pixel} pixel Pixel
* @param {module:ol/pixel~Pixel} pixel Pixel
* @param {module:ol/PluggableMap} map Map.
* @private
*/
+1 -1
View File
@@ -170,7 +170,7 @@ class PointerInteraction extends Interaction {
/**
* @param {Array.<module:ol/pointer/PointerEvent>} pointerEvents List of events.
* @return {module:ol~Pixel} Centroid pixel.
* @return {module:ol/pixel~Pixel} Centroid pixel.
*/
export function centroid(pointerEvents) {
const length = pointerEvents.length;
+2 -2
View File
@@ -22,7 +22,7 @@ import RBush from '../structs/RBush.js';
* @typedef {Object} Result
* @property {boolean} snapped
* @property {module:ol/coordinate~Coordinate|null} vertex
* @property {module:ol~Pixel|null} vertexPixel
* @property {module:ol/pixel~Pixel|null} vertexPixel
*/
@@ -348,7 +348,7 @@ class Snap extends PointerInteraction {
}
/**
* @param {module:ol~Pixel} pixel Pixel
* @param {module:ol/pixel~Pixel} pixel Pixel
* @param {module:ol/coordinate~Coordinate} pixelCoordinate Coordinate
* @param {module:ol/PluggableMap} map Map.
* @return {module:ol/interaction/Snap~Result} Snap result
+1 -1
View File
@@ -163,7 +163,7 @@ class Translate extends PointerInteraction {
/**
* Tests to see if the given coordinates intersects any of our selected
* features.
* @param {module:ol~Pixel} pixel Pixel coordinate to test for intersection.
* @param {module:ol/pixel~Pixel} pixel Pixel coordinate to test for intersection.
* @param {module:ol/PluggableMap} map Map to test the intersection on.
* @return {module:ol/Feature} Returns the feature found at the specified pixel
* coordinates.