ol 7.2.3-dev.1675699817013 → 7.2.3-dev.1675838739385
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 +2 -2
- package/dist/ol.js.map +1 -1
- package/interaction/KeyboardZoom.d.ts.map +1 -1
- package/interaction/KeyboardZoom.js +3 -7
- package/package.json +1 -1
- package/util.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardZoom.d.ts","sourceRoot":"","sources":["KeyboardZoom.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAOA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,2CAsBC;IAjBC;;;OAGG;IACH,mBAA2E;IAE3E;;;OAGG;IACH,eAA+C;IAE/C;;;OAGG;IACH,kBAAwE;
|
|
1
|
+
{"version":3,"file":"KeyboardZoom.d.ts","sourceRoot":"","sources":["KeyboardZoom.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAOA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,2CAsBC;IAjBC;;;OAGG;IACH,mBAA2E;IAE3E;;;OAGG;IACH,eAA+C;IAE/C;;;OAGG;IACH,kBAAwE;CA+B3E"}
|
|
@@ -72,14 +72,10 @@ class KeyboardZoom extends Interaction {
|
|
|
72
72
|
const keyEvent = /** @type {KeyboardEvent} */ (
|
|
73
73
|
mapBrowserEvent.originalEvent
|
|
74
74
|
);
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
this.condition_(mapBrowserEvent) &&
|
|
78
|
-
(charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))
|
|
79
|
-
) {
|
|
75
|
+
const key = keyEvent.key;
|
|
76
|
+
if (this.condition_(mapBrowserEvent) && (key === '+' || key === '-')) {
|
|
80
77
|
const map = mapBrowserEvent.map;
|
|
81
|
-
const delta =
|
|
82
|
-
charCode == '+'.charCodeAt(0) ? this.delta_ : -this.delta_;
|
|
78
|
+
const delta = key === '+' ? this.delta_ : -this.delta_;
|
|
83
79
|
const view = map.getView();
|
|
84
80
|
zoomByDelta(view, delta, undefined, this.duration_);
|
|
85
81
|
keyEvent.preventDefault();
|
package/package.json
CHANGED
package/util.js
CHANGED