@maplat/ui 0.10.0 → 0.10.2
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/README.md +1 -0
- package/dist/assets/maplat.css +3 -3
- package/dist/assets/maplat.css.map +1 -1
- package/dist/assets/maplat.js +1 -1
- package/dist/assets/maplat.js.LICENSE.txt +1 -13
- package/dist/assets/maplat.js.map +1 -1
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.LICENSE.txt +1 -1
- package/dist/service-worker.js.map +1 -1
- package/package.json +18 -14
- package/src/contextmenu.js +29 -29
- package/src/freeze_locales.js +336 -336
- package/src/index.js +1754 -1754
- package/src/maplat_control.js +25 -25
package/src/maplat_control.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { Control, Rotate } from "
|
|
2
|
-
import { CLASS_UNSELECTABLE, CLASS_CONTROL } from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { stopPropagation } from "ol5/events/Event";
|
|
7
|
-
import ViewHint from "ol5/ViewHint";
|
|
8
|
-
import { clamp } from "ol5/math";
|
|
9
|
-
import { MapEvent } from "ol5";
|
|
1
|
+
import { Control, Rotate, Zoom as BaseZoom } from "ol/control";
|
|
2
|
+
import { CLASS_UNSELECTABLE, CLASS_CONTROL } from "ol/css";
|
|
3
|
+
import ViewHint from "ol/ViewHint";
|
|
4
|
+
import { clamp } from "ol/math";
|
|
5
|
+
import { MapEvent } from "ol";
|
|
10
6
|
import { addResizeListener } from "../legacy/detect-element-resize";
|
|
11
7
|
import pointer from "./pointer_images";
|
|
12
8
|
import { createElement } from "@maplat/core";
|
|
13
|
-
import { Zoom as BaseZoom } from "ol/control";
|
|
14
9
|
|
|
15
10
|
let control_settings = {};
|
|
16
11
|
const delegator = {
|
|
@@ -147,20 +142,25 @@ export class SliderCommon extends Control {
|
|
|
147
142
|
* @type {ol.pointer.PointerEventHandler}
|
|
148
143
|
* @private
|
|
149
144
|
*/
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
this
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
145
|
+
containerElement.addEventListener("pointerdown", ev => {
|
|
146
|
+
ev.stopPropagation();
|
|
147
|
+
this.handleDraggerStart_(ev);
|
|
148
|
+
});
|
|
149
|
+
containerElement.addEventListener("pointermove", ev => {
|
|
150
|
+
ev.stopPropagation();
|
|
151
|
+
this.handleDraggerDrag_(ev);
|
|
152
|
+
});
|
|
153
|
+
containerElement.addEventListener("pointerup", ev => {
|
|
154
|
+
ev.stopPropagation();
|
|
155
|
+
this.handleDraggerEnd_(ev);
|
|
156
|
+
});
|
|
157
|
+
thumbElement.addEventListener("click", ev => {
|
|
158
|
+
ev.stopPropagation();
|
|
159
|
+
});
|
|
160
|
+
containerElement.addEventListener("mouseout", ev => {
|
|
161
|
+
ev.stopPropagation();
|
|
162
|
+
this.handleDraggerEnd_(ev);
|
|
163
|
+
});
|
|
164
164
|
|
|
165
165
|
if (control_settings["slider_color"]) {
|
|
166
166
|
const rgb = hexRgb(control_settings["slider_color"]);
|
|
@@ -294,7 +294,7 @@ export class SliderCommon extends Control {
|
|
|
294
294
|
handleDraggerStart_(event) {
|
|
295
295
|
if (
|
|
296
296
|
!this.dragging_ &&
|
|
297
|
-
event.
|
|
297
|
+
event.target === this.element.firstElementChild &&
|
|
298
298
|
!this.element.classList.contains("disable")
|
|
299
299
|
) {
|
|
300
300
|
this.getMap().getView().setHint(ViewHint.INTERACTING, 1);
|