ol 10.1.1-dev.1725269890922 → 10.1.1-dev.1725276132712

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,7 +111,7 @@ declare class MouseWheelZoom extends Interaction {
111
111
  private condition_;
112
112
  /**
113
113
  * @private
114
- * @type {?import("../coordinate.js").Coordinate}
114
+ * @type {?import("../pixel.js").Pixel}
115
115
  */
116
116
  private lastAnchor_;
117
117
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MouseWheelZoom.d.ts","sourceRoot":"","sources":["MouseWheelZoom.js"],"names":[],"mappings":";mBAUa,UAAU,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AADjC;;GAEG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,2CA2GC;IApGC;;;OAGG;IACH,oBAAoB;IAEpB;;;OAGG;IACH,mBAAmB;IAEnB;;;OAGG;IACH,kBAAsE;IAEtE;;;OAGG;IACH,kBAAwE;IAExE;;;OAGG;IACH,iBAAoE;IAEpE;;;OAGG;IACH,mBAC4D;IAE5D;;;OAGG;IACH,6BAGW;IAIX;;;OAGG;IACH,mBAEa;IAEb;;;OAGG;IACH,oBAAuB;IAEvB;;;OAGG;IACH,mBAA2B;IAE3B;;;OAGG;IACH,mBAAe;IAEf;;;OAGG;IACH,cAAsB;IAEtB;;;;;OAKG;IACH,0BAA4B;IAE5B;;;OAGG;IACH,2BAAuB;IAEvB;;;;OAIG;IACH,sBAAwB;IAG1B;;OAEG;IACH,wBAYC;IA2FD;;;OAGG;IACH,yBAsBC;IAED;;;;;OAKG;IACH,0BAJW,OAAO,QASjB;CACF;wBApSsC,kBAAkB"}
1
+ {"version":3,"file":"MouseWheelZoom.d.ts","sourceRoot":"","sources":["MouseWheelZoom.js"],"names":[],"mappings":";mBAUa,UAAU,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AADjC;;GAEG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,2CA2GC;IApGC;;;OAGG;IACH,oBAAoB;IAEpB;;;OAGG;IACH,mBAAmB;IAEnB;;;OAGG;IACH,kBAAsE;IAEtE;;;OAGG;IACH,kBAAwE;IAExE;;;OAGG;IACH,iBAAoE;IAEpE;;;OAGG;IACH,mBAC4D;IAE5D;;;OAGG;IACH,6BAGW;IAIX;;;OAGG;IACH,mBAEa;IAEb;;;OAGG;IACH,oBAAuB;IAEvB;;;OAGG;IACH,mBAA2B;IAE3B;;;OAGG;IACH,mBAAe;IAEf;;;OAGG;IACH,cAAsB;IAEtB;;;;;OAKG;IACH,0BAA4B;IAE5B;;;OAGG;IACH,2BAAuB;IAEvB;;;;OAIG;IACH,sBAAwB;IAG1B;;OAEG;IACH,wBAYC;IA8FD;;;OAGG;IACH,yBA2BC;IAED;;;;;OAKG;IACH,0BAJW,OAAO,QASjB;CACF;wBA5SsC,kBAAkB"}
@@ -104,7 +104,7 @@ class MouseWheelZoom extends Interaction {
104
104
 
105
105
  /**
106
106
  * @private
107
- * @type {?import("../coordinate.js").Coordinate}
107
+ * @type {?import("../pixel.js").Pixel}
108
108
  */
109
109
  this.lastAnchor_ = null;
110
110
 
@@ -161,7 +161,7 @@ class MouseWheelZoom extends Interaction {
161
161
  view.endInteraction(
162
162
  undefined,
163
163
  this.lastDelta_ ? (this.lastDelta_ > 0 ? 1 : -1) : 0,
164
- this.lastAnchor_,
164
+ this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,
165
165
  );
166
166
  }
167
167
 
@@ -188,7 +188,7 @@ class MouseWheelZoom extends Interaction {
188
188
  wheelEvent.preventDefault();
189
189
 
190
190
  if (this.useAnchor_) {
191
- this.lastAnchor_ = mapBrowserEvent.coordinate;
191
+ this.lastAnchor_ = mapBrowserEvent.pixel;
192
192
  }
193
193
 
194
194
  // Delta normalisation inspired by
@@ -236,7 +236,10 @@ class MouseWheelZoom extends Interaction {
236
236
  this.endInteraction_.bind(this),
237
237
  this.timeout_,
238
238
  );
239
- view.adjustZoom(-delta / this.deltaPerZoom_, this.lastAnchor_);
239
+ view.adjustZoom(
240
+ -delta / this.deltaPerZoom_,
241
+ this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,
242
+ );
240
243
  this.startTime_ = now;
241
244
  return false;
242
245
  }
@@ -273,7 +276,12 @@ class MouseWheelZoom extends Interaction {
273
276
  // view has a zoom constraint, zoom by 1
274
277
  delta = delta ? (delta > 0 ? 1 : -1) : 0;
275
278
  }
276
- zoomByDelta(view, delta, this.lastAnchor_, this.duration_);
279
+ zoomByDelta(
280
+ view,
281
+ delta,
282
+ this.lastAnchor_ ? map.getCoordinateFromPixel(this.lastAnchor_) : null,
283
+ this.duration_,
284
+ );
277
285
 
278
286
  this.mode_ = undefined;
279
287
  this.totalDelta_ = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "10.1.1-dev.1725269890922",
3
+ "version": "10.1.1-dev.1725276132712",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '10.1.1-dev.1725269890922';
36
+ export const VERSION = '10.1.1-dev.1725276132712';