@maplat/ui 0.10.5 → 0.10.6

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.
Files changed (37) hide show
  1. package/LICENSE +223 -223
  2. package/README.md +91 -91
  3. package/dist/assets/locales/en/translation.json +64 -64
  4. package/dist/assets/locales/ja/translation.json +64 -64
  5. package/dist/assets/locales/ko/translation.json +65 -65
  6. package/dist/assets/locales/zh/translation.json +65 -65
  7. package/dist/assets/locales/zh-TW/translation.json +65 -65
  8. package/dist/assets/maplat.css +1 -1
  9. package/dist/assets/maplat.css.map +1 -1
  10. package/dist/assets/maplat.js +1 -1
  11. package/dist/assets/maplat.js.LICENSE.txt +1 -1
  12. package/dist/assets/maplat.js.map +1 -1
  13. package/dist/index.html +125 -39
  14. package/dist/service-worker.js +1 -1
  15. package/dist/service-worker.js.LICENSE.txt +1 -1
  16. package/legacy/bootstrap-native.js +1934 -1934
  17. package/legacy/detect-element-resize.js +153 -153
  18. package/legacy/iziToast.js +1301 -1301
  19. package/legacy/page.js +1153 -1153
  20. package/legacy/qrcode.js +616 -616
  21. package/less/bootstrap.less +7010 -7010
  22. package/less/font-awesome.less +30 -30
  23. package/less/font-face.less +10 -10
  24. package/less/font-face_packed.less +11 -11
  25. package/less/iziToast.less +1732 -1732
  26. package/less/maplat-specific.less +652 -652
  27. package/less/ui.less +11 -11
  28. package/less/ui_packed.less +10 -10
  29. package/locales/en/translation.json +64 -64
  30. package/locales/ja/translation.json +64 -64
  31. package/locales/ko/translation.json +65 -65
  32. package/locales/zh/translation.json +65 -65
  33. package/locales/zh-TW/translation.json +65 -65
  34. package/package.json +106 -106
  35. package/src/index.js +27 -11
  36. package/src/maplat_control.js +12 -18
  37. package/src/service-worker.js +1 -1
@@ -1,65 +1,65 @@
1
- {
2
- "control": {
3
- "compass": "停止旋轉",
4
- "info": "顯示地圖信息",
5
- "zoom": "地圖尺寸調整",
6
- "gps": "獲取GPS位置",
7
- "home": "返回起點",
8
- "help": "查看幫助",
9
- "trans": "調整地圖透明度",
10
- "share": "分享",
11
- "hide_marker": "隱藏標記",
12
- "border": "顯示地圖邊界"
13
- },
14
- "html": {
15
- "close": "關閉",
16
- "app_loading_body": "正在上傳中……",
17
- "acquiring_gps": "獲取GPS數據中",
18
- "author": "作者",
19
- "createdAt": "創建日期",
20
- "era": "對象所處時期",
21
- "contributor": "收藏捐贈者",
22
- "mapper": "製圖人",
23
- "license": "地圖許可",
24
- "dataLicense": "映射數據許可",
25
- "attr": "地圖版權",
26
- "dataAttr": "映射數據版權",
27
- "reference": "來源參考",
28
- "description": "說明",
29
- "cache_handle": "地圖緩存佔用",
30
- "cache_delete": "清除緩存",
31
- "cache_fetch": "批量下載",
32
- "cache_cancel": "停止下載",
33
- "cache_processing": "正在計算...",
34
- "help_title": "Maplat 幫助",
35
- "help_using_maplat": "本站點是使用開源歷史地圖<a href='https://github.com/code4history/Maplat/wiki' target='_blank'>Maplat</a>為基礎製作的。",
36
- "help_operation_title": "地圖的操作方法",
37
- "help_operation_content": "用電腦訪問時可以用鼠標拖動地圖。使用手機訪問時用手指拖動地圖。 <br>調整地圖大小時,用電腦時,點擊左上角的<img src='${plus.png}'> <img src='${minus.png}'>按鈕來操作,使用手機時使用兩個手指縮放來進行操作。 <br>在手機上可以使用兩個手指按住旋轉地圖。 <br>按下<img src='${home.png}'>按鈕可以返回地圖的起點。 <br><img src='${compass.png}'>按鈕上表的羅盤顯示著當前方向與北方向的角度,如果按下這個按鈕,地圖的旋轉角度會恢復成正北方向表示。",
38
- "help_selection_title": "地圖的切換選擇方法",
39
- "help_selection_content": "在頁面的左下和右下的位置,可以找到像<img src='${overlay.png}'>這樣的可滑動的縮略圖。可以選擇想查看的地圖。 <br>左右滑動對想看的地圖進行選擇,點擊後即可切換成想看的地圖。 <br>在左下的地圖滑塊是基礎的地圖(當前年代),右下邊可選擇的地圖滑塊是手繪地圖或歷史地圖。",
40
- "help_gps_title": "在地圖上顯示您的位置",
41
- "help_gps_content": "按下<img src='${gps.png}'>按鈕,開啟GPS功能,可以用<img src='${bluedot.png}'>在地圖上顯示您所在的位置。 <br>再次按下時,會關閉GPS功能。 <br>如果您所在地沒有在地圖上顯示出來的話,會提示信息,並且會自動關閉GPS功能。",
42
- "help_poi_title": "場所信息顯示",
43
- "help_poi_content": "在地圖上顯示<img src='${defaultpin.png}'>這樣標記的地方,這個支持拓展信息顯示的地方。 <br>標記點擊時,會顯示支持的信息。",
44
- "help_etc_title": "其它",
45
- "help_etc_attr": "<img src='${attr.png}'>按鈕 顯示中地圖的製作者、所有者、許可等各種信息顯示。",
46
- "help_etc_help": "<img src='${help.png}'>按鈕: 顯示這個幫助信息。",
47
- "help_share_help": "<img src='${share.png}'>按鈕: 顯示向SNS等其它應用分享的頁面。",
48
- "help_etc_hide_marker": "<img src='${hide_marker.png}'>按鈕: 顯示標記/隱藏標記 的功能切換。 <br>長按按鈕,會在畫面上按順序對每種標記進行顯示/隱藏的切換操作。",
49
- "help_etc_border": "<img src='${border.png}'>按鈕: 地圖的邊界顯示。 <br>在邊界內點擊也可以切換地圖顯示。 <br>在電腦上操作可以用鼠標在地圖上上移動選擇後點擊進行地圖切換顯示,手機上在選中地圖後,再一次點擊後進行地圖切換顯示。",
50
- "help_etc_slider": "<img src='${slider.png}'>側邊欄: 顯示中的地圖的透明度調整,可以將背景中的地圖透明地看到。 <br>只支持在手繪地圖、歷史地圖中使用,基本地圖顯示時不可用。",
51
- "share_title": "分享",
52
- "share_app_title": "分享此應用",
53
- "share_state_title": "分享現在所在位置",
54
- "share_copy": "複製",
55
- "hide_marker_title": "標記項顯示切換"
56
- },
57
- "app": {
58
- "fake_explanation": "※以%1$s為中心,超出%2$dkm以上時、以%1$s為中心使用模糊經緯度表示周邊範圍。",
59
- "acquiring_gps_desc": "GPS數據獲取中……",
60
- "out_of_map": "超出地圖範圍",
61
- "out_of_map_desc": "GPS數據獲取結果已超出地圖範圍外。 GPS功能已關閉。",
62
- "out_of_map_area": "已經超出地圖範圍以外。請返回地圖標準位置。",
63
- "copy_toast": "已經復製到剪貼板。"
64
- }
65
- }
1
+ {
2
+ "control": {
3
+ "compass": "停止旋轉",
4
+ "info": "顯示地圖信息",
5
+ "zoom": "地圖尺寸調整",
6
+ "gps": "獲取GPS位置",
7
+ "home": "返回起點",
8
+ "help": "查看幫助",
9
+ "trans": "調整地圖透明度",
10
+ "share": "分享",
11
+ "hide_marker": "隱藏標記",
12
+ "border": "顯示地圖邊界"
13
+ },
14
+ "html": {
15
+ "close": "關閉",
16
+ "app_loading_body": "正在上傳中……",
17
+ "acquiring_gps": "獲取GPS數據中",
18
+ "author": "作者",
19
+ "createdAt": "創建日期",
20
+ "era": "對象所處時期",
21
+ "contributor": "收藏捐贈者",
22
+ "mapper": "製圖人",
23
+ "license": "地圖許可",
24
+ "dataLicense": "映射數據許可",
25
+ "attr": "地圖版權",
26
+ "dataAttr": "映射數據版權",
27
+ "reference": "來源參考",
28
+ "description": "說明",
29
+ "cache_handle": "地圖緩存佔用",
30
+ "cache_delete": "清除緩存",
31
+ "cache_fetch": "批量下載",
32
+ "cache_cancel": "停止下載",
33
+ "cache_processing": "正在計算...",
34
+ "help_title": "Maplat 幫助",
35
+ "help_using_maplat": "本站點是使用開源歷史地圖<a href='https://github.com/code4history/Maplat/wiki' target='_blank'>Maplat</a>為基礎製作的。",
36
+ "help_operation_title": "地圖的操作方法",
37
+ "help_operation_content": "用電腦訪問時可以用鼠標拖動地圖。使用手機訪問時用手指拖動地圖。 <br>調整地圖大小時,用電腦時,點擊左上角的<img src='${plus.png}'> <img src='${minus.png}'>按鈕來操作,使用手機時使用兩個手指縮放來進行操作。 <br>在手機上可以使用兩個手指按住旋轉地圖。 <br>按下<img src='${home.png}'>按鈕可以返回地圖的起點。 <br><img src='${compass.png}'>按鈕上表的羅盤顯示著當前方向與北方向的角度,如果按下這個按鈕,地圖的旋轉角度會恢復成正北方向表示。",
38
+ "help_selection_title": "地圖的切換選擇方法",
39
+ "help_selection_content": "在頁面的左下和右下的位置,可以找到像<img src='${overlay.png}'>這樣的可滑動的縮略圖。可以選擇想查看的地圖。 <br>左右滑動對想看的地圖進行選擇,點擊後即可切換成想看的地圖。 <br>在左下的地圖滑塊是基礎的地圖(當前年代),右下邊可選擇的地圖滑塊是手繪地圖或歷史地圖。",
40
+ "help_gps_title": "在地圖上顯示您的位置",
41
+ "help_gps_content": "按下<img src='${gps.png}'>按鈕,開啟GPS功能,可以用<img src='${bluedot.png}'>在地圖上顯示您所在的位置。 <br>再次按下時,會關閉GPS功能。 <br>如果您所在地沒有在地圖上顯示出來的話,會提示信息,並且會自動關閉GPS功能。",
42
+ "help_poi_title": "場所信息顯示",
43
+ "help_poi_content": "在地圖上顯示<img src='${defaultpin.png}'>這樣標記的地方,這個支持拓展信息顯示的地方。 <br>標記點擊時,會顯示支持的信息。",
44
+ "help_etc_title": "其它",
45
+ "help_etc_attr": "<img src='${attr.png}'>按鈕 顯示中地圖的製作者、所有者、許可等各種信息顯示。",
46
+ "help_etc_help": "<img src='${help.png}'>按鈕: 顯示這個幫助信息。",
47
+ "help_share_help": "<img src='${share.png}'>按鈕: 顯示向SNS等其它應用分享的頁面。",
48
+ "help_etc_hide_marker": "<img src='${hide_marker.png}'>按鈕: 顯示標記/隱藏標記 的功能切換。 <br>長按按鈕,會在畫面上按順序對每種標記進行顯示/隱藏的切換操作。",
49
+ "help_etc_border": "<img src='${border.png}'>按鈕: 地圖的邊界顯示。 <br>在邊界內點擊也可以切換地圖顯示。 <br>在電腦上操作可以用鼠標在地圖上上移動選擇後點擊進行地圖切換顯示,手機上在選中地圖後,再一次點擊後進行地圖切換顯示。",
50
+ "help_etc_slider": "<img src='${slider.png}'>側邊欄: 顯示中的地圖的透明度調整,可以將背景中的地圖透明地看到。 <br>只支持在手繪地圖、歷史地圖中使用,基本地圖顯示時不可用。",
51
+ "share_title": "分享",
52
+ "share_app_title": "分享此應用",
53
+ "share_state_title": "分享現在所在位置",
54
+ "share_copy": "複製",
55
+ "hide_marker_title": "標記項顯示切換"
56
+ },
57
+ "app": {
58
+ "fake_explanation": "※以%1$s為中心,超出%2$dkm以上時、以%1$s為中心使用模糊經緯度表示周邊範圍。",
59
+ "acquiring_gps_desc": "GPS數據獲取中……",
60
+ "out_of_map": "超出地圖範圍",
61
+ "out_of_map_desc": "GPS數據獲取結果已超出地圖範圍外。 GPS功能已關閉。",
62
+ "out_of_map_area": "已經超出地圖範圍以外。請返回地圖標準位置。",
63
+ "copy_toast": "已經復製到剪貼板。"
64
+ }
65
+ }
package/package.json CHANGED
@@ -1,106 +1,106 @@
1
- {
2
- "name": "@maplat/ui",
3
- "version": "0.10.5",
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
- "main": "src/index.js",
6
- "module": "src/index.js",
7
- "files": [
8
- "src/",
9
- "dist/",
10
- "legacy/",
11
- "less/",
12
- "parts/",
13
- "fonts/",
14
- "locales/"
15
- ],
16
- "scripts": {
17
- "server": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-cli serve --config ./webpack_config/webpack.config.standard.dev.js --mode=development",
18
- "server:packed": "cross-env NODE_OPTIONS=--openssl-legacy-provider npm run freeze && cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-cli serve --config ./webpack_config/webpack.config.packed.dev.js --mode=development",
19
- "build": "npm run build:standard && npm run build:packed",
20
- "build:standard": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --color --progress --config ./webpack_config/webpack.config.standard.js",
21
- "build:packed": "cross-env NODE_OPTIONS=--openssl-legacy-provider npm run freeze && cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack_config/webpack.config.packed.js",
22
- "zip": "gulp zip",
23
- "test": "jest",
24
- "preversion": "npm run lint",
25
- "version": "npm run build && npm run zip && git add -A",
26
- "freeze": "node bin/freezer.js",
27
- "lint": "npm run lint:eslint && npm run lint:prettier",
28
- "lint:eslint": "eslint \"{src,spec}/**/*.js\" --fix",
29
- "lint:prettier": "prettier \"./{src,spec}/**/*.js\" --write",
30
- "git_switch": "gulp git_switch"
31
- },
32
- "repository": {
33
- "type": "git",
34
- "url": "git+https://github.com/code4history/Maplat.git"
35
- },
36
- "keywords": [
37
- "warp",
38
- "GIS"
39
- ],
40
- "author": "Kohei Otsuka, Code for History",
41
- "license": "Maplat Limited License 1.1",
42
- "bugs": {
43
- "url": "https://github.com/code4history/Maplat/issues"
44
- },
45
- "homepage": "https://github.com/code4history/Maplat/wiki",
46
- "dependencies": {
47
- "@maplat/core": "^0.10.6",
48
- "@maplat/tin": "^0.9.4",
49
- "@turf/turf": "^6.5.0",
50
- "caniuse-lite": "^1.0.30001431",
51
- "lodash.template": "^4.5.0",
52
- "ol": "^6.14.1",
53
- "ol-contextmenu": "^4.1.0",
54
- "swiper": "^6.7.1",
55
- "swiper4": "npm:swiper@^4.5.1",
56
- "weiwudi": "^0.1.4"
57
- },
58
- "devDependencies": {
59
- "@babel/cli": "^7.17.10",
60
- "@babel/core": "^7.18.2",
61
- "@babel/preset-env": "^7.18.2",
62
- "babel-jest": "^28.1.0",
63
- "babel-loader": "^8.2.5",
64
- "clean-webpack-plugin": "^4.0.0",
65
- "concaveman": "https://github.com/grassick/concaveman#patch-1",
66
- "copy-webpack-plugin": "^6.4.1",
67
- "core-js": "^3.22.7",
68
- "cross-env": "^7.0.3",
69
- "css-loader": "^5.2.6",
70
- "css-minimizer-webpack-plugin": "^4.2.2",
71
- "eslint": "^7.32.0",
72
- "eslint-config-prettier": "^8.5.0",
73
- "eslint-loader": "^4.0.2",
74
- "eslint-plugin-jest": "^26.3.0",
75
- "file-loader": "^6.2.0",
76
- "fs-extra": "^10.1.0",
77
- "gulp": "^4.0.2",
78
- "gulp-cli": "^2.3.0",
79
- "gulp-zip": "^5.1.0",
80
- "html-webpack-plugin": "^5.5.0",
81
- "jest": "^28.1.0",
82
- "jest-canvas-mock": "^2.3.1",
83
- "less": "^4.1.2",
84
- "less-loader": "^11.0.0",
85
- "lodash": "^4.17.21",
86
- "mini-css-extract-plugin": "^2.6.0",
87
- "prettier": "^2.6.2",
88
- "strip-whitespace-loader": "github:kochizufan/strip-whitespace-loader#fix_dq_npm",
89
- "terser-webpack-plugin": "^5.3.1",
90
- "url-loader": "^4.1.1",
91
- "webpack": "^5.72.1",
92
- "webpack-cli": "^4.9.2",
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"
102
- },
103
- "resolutions": {
104
- "concaveman": "https://github.com/grassick/concaveman#patch-1"
105
- }
106
- }
1
+ {
2
+ "name": "@maplat/ui",
3
+ "version": "0.10.6",
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
+ "main": "src/index.js",
6
+ "module": "src/index.js",
7
+ "files": [
8
+ "src/",
9
+ "dist/",
10
+ "legacy/",
11
+ "less/",
12
+ "parts/",
13
+ "fonts/",
14
+ "locales/"
15
+ ],
16
+ "scripts": {
17
+ "server": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-cli serve --config ./webpack_config/webpack.config.standard.dev.js --mode=development",
18
+ "server:packed": "cross-env NODE_OPTIONS=--openssl-legacy-provider npm run freeze && cross-env NODE_OPTIONS=--openssl-legacy-provider webpack-cli serve --config ./webpack_config/webpack.config.packed.dev.js --mode=development",
19
+ "build": "npm run build:standard && npm run build:packed",
20
+ "build:standard": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --color --progress --config ./webpack_config/webpack.config.standard.js",
21
+ "build:packed": "cross-env NODE_OPTIONS=--openssl-legacy-provider npm run freeze && cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack_config/webpack.config.packed.js",
22
+ "zip": "gulp zip",
23
+ "test": "jest",
24
+ "preversion": "npm run lint",
25
+ "version": "npm run build && npm run zip && git add -A",
26
+ "freeze": "node bin/freezer.js",
27
+ "lint": "npm run lint:eslint && npm run lint:prettier",
28
+ "lint:eslint": "eslint \"{src,spec}/**/*.js\" --fix",
29
+ "lint:prettier": "prettier \"./{src,spec}/**/*.js\" --write",
30
+ "git_switch": "gulp git_switch"
31
+ },
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "git+https://github.com/code4history/Maplat.git"
35
+ },
36
+ "keywords": [
37
+ "warp",
38
+ "GIS"
39
+ ],
40
+ "author": "Kohei Otsuka, Code for History",
41
+ "license": "Maplat Limited License 1.1",
42
+ "bugs": {
43
+ "url": "https://github.com/code4history/Maplat/issues"
44
+ },
45
+ "homepage": "https://github.com/code4history/Maplat/wiki",
46
+ "dependencies": {
47
+ "@maplat/core": "https://github.com/code4history/MaplatCore#yamato_koriyama_4",
48
+ "@maplat/tin": "^0.9.4",
49
+ "@turf/turf": "^6.5.0",
50
+ "caniuse-lite": "^1.0.30001431",
51
+ "lodash.template": "^4.5.0",
52
+ "ol": "^6.14.1",
53
+ "ol-contextmenu": "^4.1.0",
54
+ "swiper": "^6.7.1",
55
+ "swiper4": "npm:swiper@^4.5.1",
56
+ "weiwudi": "^0.1.4"
57
+ },
58
+ "devDependencies": {
59
+ "@babel/cli": "^7.17.10",
60
+ "@babel/core": "^7.18.2",
61
+ "@babel/preset-env": "^7.18.2",
62
+ "babel-jest": "^28.1.0",
63
+ "babel-loader": "^8.2.5",
64
+ "clean-webpack-plugin": "^4.0.0",
65
+ "concaveman": "https://github.com/grassick/concaveman#patch-1",
66
+ "copy-webpack-plugin": "^6.4.1",
67
+ "core-js": "^3.22.7",
68
+ "cross-env": "^7.0.3",
69
+ "css-loader": "^5.2.6",
70
+ "css-minimizer-webpack-plugin": "^4.2.2",
71
+ "eslint": "^7.32.0",
72
+ "eslint-config-prettier": "^8.5.0",
73
+ "eslint-loader": "^4.0.2",
74
+ "eslint-plugin-jest": "^26.3.0",
75
+ "file-loader": "^6.2.0",
76
+ "fs-extra": "^10.1.0",
77
+ "gulp": "^4.0.2",
78
+ "gulp-cli": "^2.3.0",
79
+ "gulp-zip": "^5.1.0",
80
+ "html-webpack-plugin": "^5.5.0",
81
+ "jest": "^28.1.0",
82
+ "jest-canvas-mock": "^2.3.1",
83
+ "less": "^4.1.2",
84
+ "less-loader": "^11.0.0",
85
+ "lodash": "^4.17.21",
86
+ "mini-css-extract-plugin": "^2.6.0",
87
+ "prettier": "^2.6.2",
88
+ "strip-whitespace-loader": "github:kochizufan/strip-whitespace-loader#fix_dq_npm",
89
+ "terser-webpack-plugin": "^5.3.1",
90
+ "url-loader": "^4.1.1",
91
+ "webpack": "^5.72.1",
92
+ "webpack-cli": "^4.9.2",
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"
102
+ },
103
+ "resolutions": {
104
+ "concaveman": "https://github.com/grassick/concaveman#patch-1"
105
+ }
106
+ }
package/src/index.js CHANGED
@@ -156,6 +156,7 @@ export class MaplatUi extends EventTarget {
156
156
  const enableSplash = !ui.core.initialRestore.mapID;
157
157
  const restoreTransparency = ui.core.initialRestore.transparency;
158
158
  const enableOutOfMap = !appOption.presentation_mode;
159
+ const enablePoiHtmlNoScroll = appOption.enablePoiHtmlNoScroll;
159
160
 
160
161
  if (appOption.enableShare) {
161
162
  ui.core.mapDivDocument.classList.add("enable_share");
@@ -189,9 +190,6 @@ export class MaplatUi extends EventTarget {
189
190
  if (appOption.appEnvelope) {
190
191
  ui.appEnvelope = true;
191
192
  }
192
- if (appOption.northTop) {
193
- ui.northTop = true;
194
- }
195
193
 
196
194
  let pwaManifest = appOption.pwaManifest;
197
195
  let pwaWorker = appOption.pwaWorker;
@@ -276,8 +274,16 @@ export class MaplatUi extends EventTarget {
276
274
  </d>
277
275
 
278
276
  <d c="modal_poi_content">
279
- <d c="poi_web embed-responsive embed-responsive-60vh">
280
- <iframe c="poi_iframe iframe_poi" frameborder="0" src=""></iframe>
277
+ <d c="poi_web${
278
+ enablePoiHtmlNoScroll
279
+ ? ""
280
+ : " embed-responsive embed-responsive-60vh"
281
+ }">
282
+ <iframe c="poi_iframe iframe_poi" frameborder="0" src=""${
283
+ enablePoiHtmlNoScroll
284
+ ? ` onload="window.addEventListener('message', (e) =>{if (e.data[0] == 'setHeight') {console.log(this.style.height = e.data[1]);}});" scrolling="no"`
285
+ : ""
286
+ }></iframe>
281
287
  </d>
282
288
  <d c="poi_data hide">
283
289
  <d c="col-xs-12 swiper-container poi_img_swiper">
@@ -514,8 +520,7 @@ export class MaplatUi extends EventTarget {
514
520
  tipLabel: ui.core.t("control.info", { ns: "translation" })
515
521
  }),
516
522
  new CompassRotate({
517
- tipLabel: ui.core.t("control.compass", { ns: "translation" }),
518
- northTop: ui.northTop
523
+ tipLabel: ui.core.t("control.compass", { ns: "translation" })
519
524
  }),
520
525
  new Zoom({
521
526
  tipLabel: ui.core.t("control.zoom", { ns: "translation" })
@@ -1423,13 +1428,25 @@ enable-background="new 0 0 10 10" xml:space="preserve">
1423
1428
  iframe.addEventListener("load", function loadEvent(event) {
1424
1429
  event.currentTarget.removeEventListener(event.type, loadEvent);
1425
1430
  const cssLink = createElement(
1426
- '<style type="text/css">html, body { height: 100vh; }\n img { width: 100vw; }</style>'
1431
+ '<style type="text/css">html, body { height: 100vh; }\n img { width: 100%; }</style>'
1432
+ );
1433
+ const jsLink = createElement(
1434
+ `<script>
1435
+ const heightGetter = document.querySelector("#heightGetter");
1436
+ const resizeObserver = new ResizeObserver(entries => {
1437
+ window.parent.postMessage(["setHeight", (entries[0].target.clientHeight + 16) + "px"], "*");
1438
+ });
1439
+ resizeObserver.observe(heightGetter);
1440
+ </script>`
1427
1441
  );
1428
- console.log(cssLink); // eslint-disable-line no-undef
1429
1442
  iframe.contentDocument.head.appendChild(cssLink[0]);
1443
+ iframe.contentDocument.head.appendChild(jsLink[0]);
1430
1444
  });
1431
1445
  iframe.removeAttribute("src");
1432
- iframe.setAttribute("srcdoc", this.core.translate(data.html));
1446
+ iframe.setAttribute(
1447
+ "srcdoc",
1448
+ `<div id="heightGetter">${this.core.translate(data.html)}</div>`
1449
+ );
1433
1450
  } else {
1434
1451
  iframe.removeAttribute("srcdoc");
1435
1452
  iframe.setAttribute("src", this.core.translate(data.url));
@@ -1595,7 +1612,6 @@ enable-background="new 0 0 10 10" xml:space="preserve">
1595
1612
  .filter(source => source.envelopeAreaIndex / areaIndex < threshold)
1596
1613
  .sort((a, b) => a.envelopeAreaIndex - b.envelopeAreaIndex)
1597
1614
  .map(source => source.mapID);
1598
- console.log(mapIDs);
1599
1615
  return mapIDs;
1600
1616
  });
1601
1617
  }
@@ -610,7 +610,7 @@ export class CompassRotate extends Rotate {
610
610
  center[1] != this.center_[1] ||
611
611
  zoom != this.zoom_
612
612
  ) {
613
- if (!this.northTop_) {
613
+ if (!this.getMap().northUp) {
614
614
  const contains = this.element.classList.contains("disable");
615
615
  if (!contains && rotation === 0) {
616
616
  this.element.classList.add("disable");
@@ -631,16 +631,17 @@ export class CompassRotate extends Rotate {
631
631
  return;
632
632
  }
633
633
  source.viewpoint2MercsAsync().then(mercs => {
634
- const rot = source.mercs2MercViewpoint(mercs)[2];
635
- const transform = `rotate(${rot}rad)`;
634
+ const direction = source.mercs2MercViewpoint(mercs)[2];
635
+ const transform = `rotate(${direction}rad)`;
636
636
  self.label_.style.msTransform = transform;
637
637
  self.label_.style.webkitTransform = transform;
638
638
  self.label_.style.transform = transform;
639
- if (this.northTop_) {
639
+ if (this.getMap().northUp) {
640
+ console.log(direction);
640
641
  const contains = self.element.classList.contains("disable");
641
- if (!contains && rot === 0) {
642
+ if (!contains && Math.abs(direction) < 0.1) {
642
643
  self.element.classList.add("disable");
643
- } else if (contains && rot !== 0) {
644
+ } else if (contains && Math.abs(direction) >= 0.1) {
644
645
  self.element.classList.remove("disable");
645
646
  }
646
647
  }
@@ -657,19 +658,12 @@ export class CompassRotate extends Rotate {
657
658
  }
658
659
  this.center_ = [];
659
660
  this.zoom_ = undefined;
660
- this.northTop_ = options.northTop;
661
661
  this.callResetNorth_ = () => {
662
- if (this.northTop_) {
663
- const layer = this.getMap().getLayers().item(0);
664
- const source = layer.getSource
665
- ? layer.getSource()
666
- : layer.getLayers().item(0).getSource();
667
- source.setViewpoint({
668
- direction: 0
669
- });
670
- } else {
671
- this.resetNorth_();
672
- }
662
+ const layer = this.getMap().getLayers().item(0);
663
+ const source = layer.getSource
664
+ ? layer.getSource()
665
+ : layer.getLayers().item(0).getSource();
666
+ source.resetCirculation();
673
667
  };
674
668
  }
675
669
  }
@@ -26,7 +26,7 @@ clientsClaim();
26
26
  * requests for URLs in the manifest.
27
27
  * See https://goo.gl/S9QRab
28
28
  */
29
- precacheAndRoute(self.__WB_MANIFEST, {});
29
+ precacheAndRoute(self.__WB_MANIFEST);
30
30
  // eslint-disable-next-line no-undef
31
31
  registerRoute(
32
32
  /(?:maps\/.+\.json|pwa\/.+|pois\/.+\.json|apps\/.+\.json|tmbs\/.+\.jpg|images\/.+\.(?:png|jpg))$/,