@maplat/ui 0.10.1 → 0.10.3
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 +4 -4
- 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 +14 -15
- package/src/maplat_control.js +25 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maplat/ui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"description": "Maplat is the cool Historical Map/Illustrated Map Viewer.\nIt can transform each map coordinates with nonlinear but homeomorphic projection and makes possible that the maps can collaborate with GPS/accurate maps, without distorting original maps.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -44,15 +44,14 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/code4history/Maplat/wiki",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@maplat/core": "^0.10.
|
|
48
|
-
"@maplat/tin": "^0.9.
|
|
47
|
+
"@maplat/core": "^0.10.4",
|
|
48
|
+
"@maplat/tin": "^0.9.3",
|
|
49
49
|
"@turf/turf": "^6.5.0",
|
|
50
50
|
"bootstrap.native": "^3.0.15",
|
|
51
51
|
"caniuse-lite": "^1.0.30001239",
|
|
52
52
|
"lodash.template": "^4.5.0",
|
|
53
53
|
"ol": "^6.1.1",
|
|
54
54
|
"ol-contextmenu": "^4.1.0",
|
|
55
|
-
"ol5": "npm:ol@^5.3.3",
|
|
56
55
|
"swiper": "^6.7.1",
|
|
57
56
|
"swiper4": "npm:swiper@^4.5.1",
|
|
58
57
|
"weiwudi": "^0.1.4"
|
|
@@ -65,11 +64,10 @@
|
|
|
65
64
|
"babel-loader": "^8.2.2",
|
|
66
65
|
"clean-webpack-plugin": "^3.0.0",
|
|
67
66
|
"concaveman": "https://github.com/grassick/concaveman#patch-1",
|
|
68
|
-
"strip-whitespace-loader": "github:kochizufan/strip-whitespace-loader#fix_dq_npm",
|
|
69
67
|
"copy-webpack-plugin": "^6.4.1",
|
|
70
68
|
"core-js": "^3.15.1",
|
|
71
69
|
"css-loader": "^5.2.6",
|
|
72
|
-
"css-minimizer-webpack-plugin": "^
|
|
70
|
+
"css-minimizer-webpack-plugin": "^4.2.2",
|
|
73
71
|
"eslint": "^7.29.0",
|
|
74
72
|
"eslint-config-prettier": "^7.2.0",
|
|
75
73
|
"eslint-loader": "^4.0.2",
|
|
@@ -87,19 +85,20 @@
|
|
|
87
85
|
"lodash": "^4.17.21",
|
|
88
86
|
"mini-css-extract-plugin": "^1.6.0",
|
|
89
87
|
"prettier": "^2.3.1",
|
|
88
|
+
"strip-whitespace-loader": "github:kochizufan/strip-whitespace-loader#fix_dq_npm",
|
|
90
89
|
"terser-webpack-plugin": "^4.2.3",
|
|
91
90
|
"url-loader": "^4.1.1",
|
|
92
91
|
"webpack": "^5.40.0",
|
|
93
92
|
"webpack-cli": "^4.7.2",
|
|
94
|
-
"webpack-dev-server": "^
|
|
95
|
-
"workbox-build": "^6.
|
|
96
|
-
"workbox-cli": "^5.
|
|
97
|
-
"workbox-core": "^6.
|
|
98
|
-
"workbox-expiration": "^6.
|
|
99
|
-
"workbox-precaching": "^6.
|
|
100
|
-
"workbox-routing": "^6.
|
|
101
|
-
"workbox-strategies": "^6.
|
|
102
|
-
"workbox-webpack-plugin": "^6.
|
|
93
|
+
"webpack-dev-server": "^4.11.1",
|
|
94
|
+
"workbox-build": "^6.5.4",
|
|
95
|
+
"workbox-cli": "^6.5.4",
|
|
96
|
+
"workbox-core": "^6.5.4",
|
|
97
|
+
"workbox-expiration": "^6.5.4",
|
|
98
|
+
"workbox-precaching": "^6.5.4",
|
|
99
|
+
"workbox-routing": "^6.5.4",
|
|
100
|
+
"workbox-strategies": "^6.5.4",
|
|
101
|
+
"workbox-webpack-plugin": "^6.5.4"
|
|
103
102
|
},
|
|
104
103
|
"resolutions": {
|
|
105
104
|
"concaveman": "https://github.com/grassick/concaveman#patch-1"
|
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);
|