@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maplat/ui",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
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",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"freeze": "node bin/freezer.js",
|
|
27
27
|
"lint": "npm run lint:eslint && npm run lint:prettier",
|
|
28
28
|
"lint:eslint": "eslint \"{src,spec}/**/*.js\" --fix",
|
|
29
|
-
"lint:prettier": "prettier \"./{src,spec}/**/*.js\" --write"
|
|
29
|
+
"lint:prettier": "prettier \"./{src,spec}/**/*.js\" --write",
|
|
30
|
+
"git_switch": "gulp git_switch"
|
|
30
31
|
},
|
|
31
32
|
"repository": {
|
|
32
33
|
"type": "git",
|
|
@@ -43,15 +44,14 @@
|
|
|
43
44
|
},
|
|
44
45
|
"homepage": "https://github.com/code4history/Maplat/wiki",
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@maplat/core": "^0.10.
|
|
47
|
-
"@maplat/tin": "^0.9.
|
|
47
|
+
"@maplat/core": "^0.10.4",
|
|
48
|
+
"@maplat/tin": "^0.9.3",
|
|
48
49
|
"@turf/turf": "^6.5.0",
|
|
49
50
|
"bootstrap.native": "^3.0.15",
|
|
50
51
|
"caniuse-lite": "^1.0.30001239",
|
|
51
52
|
"lodash.template": "^4.5.0",
|
|
52
53
|
"ol": "^6.1.1",
|
|
53
54
|
"ol-contextmenu": "^4.1.0",
|
|
54
|
-
"ol5": "npm:ol@^5.3.3",
|
|
55
55
|
"swiper": "^6.7.1",
|
|
56
56
|
"swiper4": "npm:swiper@^4.5.1",
|
|
57
57
|
"weiwudi": "^0.1.4"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"babel-jest": "^26.6.3",
|
|
64
64
|
"babel-loader": "^8.2.2",
|
|
65
65
|
"clean-webpack-plugin": "^3.0.0",
|
|
66
|
-
"
|
|
66
|
+
"concaveman": "https://github.com/grassick/concaveman#patch-1",
|
|
67
67
|
"copy-webpack-plugin": "^6.4.1",
|
|
68
68
|
"core-js": "^3.15.1",
|
|
69
69
|
"css-loader": "^5.2.6",
|
|
@@ -85,18 +85,22 @@
|
|
|
85
85
|
"lodash": "^4.17.21",
|
|
86
86
|
"mini-css-extract-plugin": "^1.6.0",
|
|
87
87
|
"prettier": "^2.3.1",
|
|
88
|
+
"strip-whitespace-loader": "github:kochizufan/strip-whitespace-loader#fix_dq_npm",
|
|
88
89
|
"terser-webpack-plugin": "^4.2.3",
|
|
89
90
|
"url-loader": "^4.1.1",
|
|
90
91
|
"webpack": "^5.40.0",
|
|
91
92
|
"webpack-cli": "^4.7.2",
|
|
92
93
|
"webpack-dev-server": "^3.11.2",
|
|
93
|
-
"workbox-build": "^6.
|
|
94
|
-
"workbox-cli": "^5.
|
|
95
|
-
"workbox-core": "^6.
|
|
96
|
-
"workbox-expiration": "^6.
|
|
97
|
-
"workbox-precaching": "^6.
|
|
98
|
-
"workbox-routing": "^6.
|
|
99
|
-
"workbox-strategies": "^6.
|
|
100
|
-
"workbox-webpack-plugin": "^6.
|
|
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"
|
|
102
|
+
},
|
|
103
|
+
"resolutions": {
|
|
104
|
+
"concaveman": "https://github.com/grassick/concaveman#patch-1"
|
|
101
105
|
}
|
|
102
106
|
}
|
package/src/contextmenu.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import ContextMenuBase from "ol-contextmenu";
|
|
2
|
-
|
|
3
|
-
export default class ContextMenu extends ContextMenuBase {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
super(options);
|
|
6
|
-
this.Internal.setItemListener = function (li, index) {
|
|
7
|
-
const this_ = this;
|
|
8
|
-
if (li && typeof this.items[index].callback === "function") {
|
|
9
|
-
(function (callback) {
|
|
10
|
-
li.addEventListener("pointerdown", evt => {
|
|
11
|
-
evt.stopPropagation();
|
|
12
|
-
});
|
|
13
|
-
li.addEventListener(
|
|
14
|
-
"click",
|
|
15
|
-
evt => {
|
|
16
|
-
evt.preventDefault();
|
|
17
|
-
const obj = {
|
|
18
|
-
coordinate: this_.getCoordinateClicked(),
|
|
19
|
-
data: this_.items[index].data || null
|
|
20
|
-
};
|
|
21
|
-
if (!callback(obj, this_.map)) this_.closeMenu();
|
|
22
|
-
},
|
|
23
|
-
false
|
|
24
|
-
);
|
|
25
|
-
})(this.items[index].callback);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
import ContextMenuBase from "ol-contextmenu";
|
|
2
|
+
|
|
3
|
+
export default class ContextMenu extends ContextMenuBase {
|
|
4
|
+
constructor(options) {
|
|
5
|
+
super(options);
|
|
6
|
+
this.Internal.setItemListener = function (li, index) {
|
|
7
|
+
const this_ = this;
|
|
8
|
+
if (li && typeof this.items[index].callback === "function") {
|
|
9
|
+
(function (callback) {
|
|
10
|
+
li.addEventListener("pointerdown", evt => {
|
|
11
|
+
evt.stopPropagation();
|
|
12
|
+
});
|
|
13
|
+
li.addEventListener(
|
|
14
|
+
"click",
|
|
15
|
+
evt => {
|
|
16
|
+
evt.preventDefault();
|
|
17
|
+
const obj = {
|
|
18
|
+
coordinate: this_.getCoordinateClicked(),
|
|
19
|
+
data: this_.items[index].data || null
|
|
20
|
+
};
|
|
21
|
+
if (!callback(obj, this_.map)) this_.closeMenu();
|
|
22
|
+
},
|
|
23
|
+
false
|
|
24
|
+
);
|
|
25
|
+
})(this.items[index].callback);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|