ol 10.1.1-dev.1725269890922 → 10.1.1-dev.1725276095052
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.
- package/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/interaction/MouseWheelZoom.d.ts +1 -1
- package/interaction/MouseWheelZoom.d.ts.map +1 -1
- package/interaction/MouseWheelZoom.js +13 -5
- package/package.json +1 -1
- package/util.js +1 -1
|
@@ -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;
|
|
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("../
|
|
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.
|
|
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(
|
|
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(
|
|
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
package/util.js
CHANGED