minor fixes
and keep original parameters in TranslateEvent the same
This commit is contained in:
@@ -70,8 +70,10 @@ export class TranslateEvent extends Event {
|
|||||||
* @param {TranslateEventType} type Type.
|
* @param {TranslateEventType} type Type.
|
||||||
* @param {Collection<import("../Feature.js").default>} features The features translated.
|
* @param {Collection<import("../Feature.js").default>} features The features translated.
|
||||||
* @param {import("../coordinate.js").Coordinate} coordinate The event coordinate.
|
* @param {import("../coordinate.js").Coordinate} coordinate The event coordinate.
|
||||||
|
* @param {import("../coordinate.js").Coordinate} startCoordinate The original coordinates before.translation started
|
||||||
|
* @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Map browser event.
|
||||||
*/
|
*/
|
||||||
constructor(type, features,startCoordinate, coordinate,mapBrowserEvent) {
|
constructor(type, features, coordinate, startCoordinate, mapBrowserEvent) {
|
||||||
|
|
||||||
super(type);
|
super(type);
|
||||||
|
|
||||||
@@ -204,8 +206,8 @@ class Translate extends PointerInteraction {
|
|||||||
|
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
new TranslateEvent(
|
new TranslateEvent(
|
||||||
TranslateEventType.TRANSLATESTART, features, this.startCoordinate_,
|
TranslateEventType.TRANSLATESTART, features,
|
||||||
event.coordinate, event));
|
event.coordinate, this.startCoordinate_, event));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -223,8 +225,8 @@ class Translate extends PointerInteraction {
|
|||||||
|
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
new TranslateEvent(
|
new TranslateEvent(
|
||||||
TranslateEventType.TRANSLATEEND, features,this.startCoordinate_,
|
TranslateEventType.TRANSLATEEND, features,
|
||||||
event.coordinate, event));
|
event.coordinate, this.startCoordinate_, event));
|
||||||
// cleanup
|
// cleanup
|
||||||
this.startCoordinate_ = null;
|
this.startCoordinate_ = null;
|
||||||
return true;
|
return true;
|
||||||
@@ -252,8 +254,8 @@ class Translate extends PointerInteraction {
|
|||||||
this.lastCoordinate_ = newCoordinate;
|
this.lastCoordinate_ = newCoordinate;
|
||||||
this.dispatchEvent(
|
this.dispatchEvent(
|
||||||
new TranslateEvent(
|
new TranslateEvent(
|
||||||
TranslateEventType.TRANSLATING, features,this.startCoordinate_,
|
TranslateEventType.TRANSLATING, features,
|
||||||
newCoordinate,event));
|
newCoordinate, this.startCoordinate_, event));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user