jodit-pro 4.13.43 → 4.13.44
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +5 -5
- package/es2015/jodit.js +2 -2
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +241 -72
- package/es2015/plugins/google-maps/google-maps.min.js +4 -4
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.js +5 -5
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +7 -7
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +5 -5
- package/es2021/jodit.js +2 -2
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +236 -75
- package/es2021/plugins/google-maps/google-maps.min.js +9 -9
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +5 -5
- package/es2021.en/jodit.js +2 -2
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +236 -75
- package/es2021.en/plugins/google-maps/google-maps.min.js +9 -9
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +2 -2
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +321 -94
- package/es5/plugins/google-maps/google-maps.min.js +2 -2
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/plugins/google-maps/config.js +1 -1
- package/esm/plugins/google-maps/ui/map/map.d.ts +3 -2
- package/esm/plugins/google-maps/ui/map/map.js +2 -2
- package/esm/plugins/google-maps/ui/map/modules/drawing-controller.d.ts +42 -0
- package/esm/plugins/google-maps/ui/map/modules/drawing-controller.js +1 -0
- package/package.json +1 -1
- package/types/plugins/google-maps/ui/map/map.d.ts +3 -2
- package/types/plugins/google-maps/ui/map/modules/drawing-controller.d.ts +42 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.13.
|
|
4
|
+
* Version: v4.13.44
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1646,7 +1646,7 @@ jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_7__.Icon.set('map', (_icon_svg__
|
|
|
1646
1646
|
jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.googleMaps = {
|
|
1647
1647
|
saveStateInStorage: true,
|
|
1648
1648
|
useStaticImage: false,
|
|
1649
|
-
apiUrl: 'https://maps.googleapis.com/maps/api/js?key=${j.o.googleMaps.API_KEY}&libraries=geometry,places
|
|
1649
|
+
apiUrl: 'https://maps.googleapis.com/maps/api/js?key=${j.o.googleMaps.API_KEY}&libraries=geometry,places&language=${j.o.language}&callback=JoditGoogleReadyHandler',
|
|
1650
1650
|
API_KEY: 'AIzaSyDjnR03hxN8fo0QJ85Jkkvk2DALTh3eynY',
|
|
1651
1651
|
dialog: {
|
|
1652
1652
|
size: [
|
|
@@ -2582,17 +2582,18 @@ UIPolylineEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__de
|
|
|
2582
2582
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31635);
|
|
2583
2583
|
/* harmony import */ var jodit_pro_plugins_google_maps_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(55029);
|
|
2584
2584
|
/* harmony import */ var _modules_add_new_in_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(22125);
|
|
2585
|
-
/* harmony import */ var
|
|
2586
|
-
/* harmony import */ var
|
|
2587
|
-
/* harmony import */ var
|
|
2588
|
-
/* harmony import */ var
|
|
2589
|
-
/* harmony import */ var
|
|
2590
|
-
/* harmony import */ var
|
|
2591
|
-
/* harmony import */ var
|
|
2592
|
-
/* harmony import */ var
|
|
2593
|
-
/* harmony import */ var
|
|
2594
|
-
/* harmony import */ var
|
|
2595
|
-
/* harmony import */ var
|
|
2585
|
+
/* harmony import */ var _modules_drawing_controller__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76864);
|
|
2586
|
+
/* harmony import */ var _modules_init_or_update_element_from_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1475);
|
|
2587
|
+
/* harmony import */ var jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(81577);
|
|
2588
|
+
/* harmony import */ var jodit_esm_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(97357);
|
|
2589
|
+
/* harmony import */ var jodit_esm_core_decorators_wait_wait__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(13525);
|
|
2590
|
+
/* harmony import */ var jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(37133);
|
|
2591
|
+
/* harmony import */ var jodit_esm_core_global__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(580);
|
|
2592
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(38837);
|
|
2593
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(41180);
|
|
2594
|
+
/* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(67510);
|
|
2595
|
+
/* harmony import */ var jodit_esm_modules_toolbar_collection_collection__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(11676);
|
|
2596
|
+
/* harmony import */ var jodit_pro_plugins_google_maps_helpers_const__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(17298);
|
|
2596
2597
|
/*!
|
|
2597
2598
|
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2598
2599
|
* See LICENSE.md in the project root for license information.
|
|
@@ -2616,7 +2617,8 @@ UIPolylineEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__de
|
|
|
2616
2617
|
|
|
2617
2618
|
|
|
2618
2619
|
|
|
2619
|
-
|
|
2620
|
+
|
|
2621
|
+
class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__.UIGroup {
|
|
2620
2622
|
className() {
|
|
2621
2623
|
return 'UIMap';
|
|
2622
2624
|
}
|
|
@@ -2629,7 +2631,7 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2629
2631
|
return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function*() {
|
|
2630
2632
|
yield this.apiLoaded;
|
|
2631
2633
|
const container = this.getElm('map-root');
|
|
2632
|
-
(0,
|
|
2634
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)(container != null, 'map-root element does not exists');
|
|
2633
2635
|
this.map = new google.maps.Map(container, {
|
|
2634
2636
|
center: {
|
|
2635
2637
|
lat: this.state.center[0],
|
|
@@ -2656,7 +2658,7 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2656
2658
|
this.state.type = type;
|
|
2657
2659
|
}
|
|
2658
2660
|
});
|
|
2659
|
-
this.
|
|
2661
|
+
this.initDrawingController();
|
|
2660
2662
|
this.onChangeElementsList();
|
|
2661
2663
|
this.onChangeSize();
|
|
2662
2664
|
this.onChangeControls();
|
|
@@ -2669,44 +2671,19 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2669
2671
|
});
|
|
2670
2672
|
}).call(this);
|
|
2671
2673
|
}
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
drawingControl: false,
|
|
2678
|
-
polygonOptions: (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__._)({}, this.options.googleMaps.map.defaultStates.polygon), {
|
|
2679
|
-
clickable: true,
|
|
2680
|
-
editable: true
|
|
2681
|
-
}),
|
|
2682
|
-
polylineOptions: (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__._)({}, this.options.googleMaps.map.defaultStates.polyline), {
|
|
2683
|
-
clickable: true,
|
|
2684
|
-
editable: true
|
|
2685
|
-
}),
|
|
2686
|
-
markerOptions: (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__._)({}, this.options.googleMaps.map.defaultStates.marker), {
|
|
2687
|
-
clickable: true
|
|
2688
|
-
}),
|
|
2689
|
-
circleOptions: (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__._)({}, this.options.googleMaps.map.defaultStates.circle), {
|
|
2690
|
-
clickable: true,
|
|
2691
|
-
editable: true
|
|
2692
|
-
})
|
|
2693
|
-
});
|
|
2694
|
-
this.drawingManager = drawingManager;
|
|
2695
|
-
google.maps.event.addListener(drawingManager, 'overlaycomplete', (event)=>{
|
|
2696
|
-
if (event.overlay) {
|
|
2697
|
-
_modules_add_new_in_state__WEBPACK_IMPORTED_MODULE_6__.addNewInState.call(this, event.overlay);
|
|
2698
|
-
event.overlay.setMap(null);
|
|
2699
|
-
}
|
|
2700
|
-
});
|
|
2701
|
-
} catch (unused) {}
|
|
2674
|
+
initDrawingController() {
|
|
2675
|
+
this.drawing = new _modules_drawing_controller__WEBPACK_IMPORTED_MODULE_7__.DrawingController(this.map, this.options.googleMaps.map.defaultStates, (overlay)=>{
|
|
2676
|
+
_modules_add_new_in_state__WEBPACK_IMPORTED_MODULE_6__.addNewInState.call(this, overlay);
|
|
2677
|
+
overlay.setMap(null);
|
|
2678
|
+
});
|
|
2702
2679
|
}
|
|
2703
2680
|
changeCreateMode(mode) {
|
|
2704
2681
|
this.state.mode = this.state.mode === mode ? 'hand' : mode;
|
|
2705
2682
|
}
|
|
2706
2683
|
onChangeMode() {
|
|
2707
|
-
var
|
|
2684
|
+
var _this_drawing;
|
|
2708
2685
|
this.j.buffer.set('createMode.gm', this.state.mode);
|
|
2709
|
-
(
|
|
2686
|
+
(_this_drawing = this.drawing) === null || _this_drawing === void 0 ? void 0 : _this_drawing.setMode(this.state.mode);
|
|
2710
2687
|
this.j.e.fire('updateToolbar');
|
|
2711
2688
|
}
|
|
2712
2689
|
onChangeElementsList() {
|
|
@@ -2717,7 +2694,7 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2717
2694
|
});
|
|
2718
2695
|
}
|
|
2719
2696
|
mapElements.length = elements.length;
|
|
2720
|
-
elements.forEach((state, index)=>
|
|
2697
|
+
elements.forEach((state, index)=>_modules_init_or_update_element_from_state__WEBPACK_IMPORTED_MODULE_8__.initOrUpdateElementFromState.call(this, state, index));
|
|
2721
2698
|
}
|
|
2722
2699
|
onChangeCenter() {
|
|
2723
2700
|
const center = this.map.getCenter();
|
|
@@ -2740,7 +2717,7 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2740
2717
|
}
|
|
2741
2718
|
}
|
|
2742
2719
|
onChangeBound() {
|
|
2743
|
-
this.options.googleMaps.saveStateInStorage && this.j.storage.set(
|
|
2720
|
+
this.options.googleMaps.saveStateInStorage && this.j.storage.set(jodit_pro_plugins_google_maps_helpers_const__WEBPACK_IMPORTED_MODULE_18__.STORAGE_KEY, {
|
|
2744
2721
|
center: this.state.center,
|
|
2745
2722
|
size: this.state.size,
|
|
2746
2723
|
zoom: this.state.zoom,
|
|
@@ -2751,8 +2728,8 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2751
2728
|
}
|
|
2752
2729
|
onChangeSize() {
|
|
2753
2730
|
const mapSize = this.getElm('map-size');
|
|
2754
|
-
(0,
|
|
2755
|
-
(0,
|
|
2731
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)(mapSize != null, 'map-size element does not exists');
|
|
2732
|
+
(0,jodit_esm_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_15__.css)(mapSize, {
|
|
2756
2733
|
width: this.state.size[0],
|
|
2757
2734
|
height: this.state.size[1]
|
|
2758
2735
|
});
|
|
@@ -2776,6 +2753,11 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2776
2753
|
}
|
|
2777
2754
|
this.layers.forEach((layer)=>layer.setMap(this.map));
|
|
2778
2755
|
}
|
|
2756
|
+
destruct() {
|
|
2757
|
+
var _this_drawing;
|
|
2758
|
+
(_this_drawing = this.drawing) === null || _this_drawing === void 0 ? void 0 : _this_drawing.destruct();
|
|
2759
|
+
return super.destruct();
|
|
2760
|
+
}
|
|
2779
2761
|
render() {
|
|
2780
2762
|
return `<div>
|
|
2781
2763
|
<div class='&__map-root'></div>
|
|
@@ -2785,8 +2767,8 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2785
2767
|
}
|
|
2786
2768
|
appendChildToContainer() {}
|
|
2787
2769
|
constructor(jodit, state, options){
|
|
2788
|
-
super(jodit), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "options", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "
|
|
2789
|
-
uid: 'jd' + (0,
|
|
2770
|
+
super(jodit), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "options", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "drawing", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "toolbar", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "mapElements", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "apiLoaded", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "mapInitialized", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "map", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(this, "layers", void 0), this.options = options, this.toolbar = new jodit_esm_modules_toolbar_collection_collection__WEBPACK_IMPORTED_MODULE_17__.ToolbarCollection(this.jodit), this.state = {
|
|
2771
|
+
uid: 'jd' + (0,jodit_esm_core_global__WEBPACK_IMPORTED_MODULE_13__.uniqueUid)() + new Date().toString().replace(/[^0-9]/g, ''),
|
|
2790
2772
|
layer: this.options.googleMaps.map.layer,
|
|
2791
2773
|
center: this.options.googleMaps.map.defaultCenter,
|
|
2792
2774
|
zoom: this.options.googleMaps.map.defaultZoom,
|
|
@@ -2812,36 +2794,36 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2812
2794
|
'gm.circle'
|
|
2813
2795
|
]);
|
|
2814
2796
|
const palette = this.getElm('map-palette');
|
|
2815
|
-
(0,
|
|
2797
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)(palette != null, 'palette element does not exists');
|
|
2816
2798
|
palette.appendChild(this.toolbar.container);
|
|
2817
2799
|
}
|
|
2818
2800
|
}
|
|
2819
2801
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2820
|
-
(0,
|
|
2802
|
+
(0,jodit_esm_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_10__.hook)('ready')
|
|
2821
2803
|
], UIMap.prototype, "onReady", null);
|
|
2822
2804
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2823
|
-
(0,
|
|
2805
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('?:changeCreateMode.gm')
|
|
2824
2806
|
], UIMap.prototype, "changeCreateMode", null);
|
|
2825
2807
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2826
|
-
(0,
|
|
2808
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('state.mode')
|
|
2827
2809
|
], UIMap.prototype, "onChangeMode", null);
|
|
2828
2810
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2829
|
-
(0,
|
|
2811
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('state.elements')
|
|
2830
2812
|
], UIMap.prototype, "onChangeElementsList", null);
|
|
2831
2813
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2832
|
-
(0,
|
|
2833
|
-
(0,
|
|
2834
|
-
(0,
|
|
2814
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('state.center'),
|
|
2815
|
+
(0,jodit_esm_core_decorators_wait_wait__WEBPACK_IMPORTED_MODULE_11__.wait)((ctx)=>ctx.mapInitialized),
|
|
2816
|
+
(0,jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_9__.debounce)()
|
|
2835
2817
|
], UIMap.prototype, "onChangeCenter", null);
|
|
2836
2818
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2837
|
-
(0,
|
|
2838
|
-
(0,
|
|
2819
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('state.zoom'),
|
|
2820
|
+
(0,jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_9__.debounce)()
|
|
2839
2821
|
], UIMap.prototype, "onChangeZoom", null);
|
|
2840
2822
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2841
|
-
(0,
|
|
2823
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('state.controls')
|
|
2842
2824
|
], UIMap.prototype, "onChangeControls", null);
|
|
2843
2825
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2844
|
-
(0,
|
|
2826
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)([
|
|
2845
2827
|
'state.center',
|
|
2846
2828
|
'state.zoom',
|
|
2847
2829
|
'state.controls',
|
|
@@ -2849,18 +2831,18 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIGroup {
|
|
|
2849
2831
|
'state.type',
|
|
2850
2832
|
'state.layer'
|
|
2851
2833
|
]),
|
|
2852
|
-
(0,
|
|
2853
|
-
(0,
|
|
2834
|
+
(0,jodit_esm_core_decorators_wait_wait__WEBPACK_IMPORTED_MODULE_11__.wait)((ctx)=>ctx.mapInitialized),
|
|
2835
|
+
(0,jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_9__.debounce)()
|
|
2854
2836
|
], UIMap.prototype, "onChangeBound", null);
|
|
2855
2837
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2856
|
-
(0,
|
|
2857
|
-
(0,
|
|
2838
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('state.size'),
|
|
2839
|
+
(0,jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_9__.debounce)()
|
|
2858
2840
|
], UIMap.prototype, "onChangeSize", null);
|
|
2859
2841
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2860
|
-
(0,
|
|
2842
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('state.type')
|
|
2861
2843
|
], UIMap.prototype, "onChangeMapType", null);
|
|
2862
2844
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
|
|
2863
|
-
(0,
|
|
2845
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_12__.watch)('state.layer')
|
|
2864
2846
|
], UIMap.prototype, "onChangeLayer", null);
|
|
2865
2847
|
|
|
2866
2848
|
|
|
@@ -2935,6 +2917,193 @@ function addNewInState(mvc) {
|
|
|
2935
2917
|
}
|
|
2936
2918
|
|
|
2937
2919
|
|
|
2920
|
+
/***/ }),
|
|
2921
|
+
|
|
2922
|
+
/***/ 76864:
|
|
2923
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2924
|
+
|
|
2925
|
+
"use strict";
|
|
2926
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2927
|
+
/* harmony export */ DrawingController: function() { return /* binding */ DrawingController; }
|
|
2928
|
+
/* harmony export */ });
|
|
2929
|
+
/* unused harmony export isDrawableMode */
|
|
2930
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82749);
|
|
2931
|
+
/* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56075);
|
|
2932
|
+
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11886);
|
|
2933
|
+
/*!
|
|
2934
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2935
|
+
* See LICENSE.md in the project root for license information.
|
|
2936
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2937
|
+
*/
|
|
2938
|
+
|
|
2939
|
+
|
|
2940
|
+
const DRAWABLE_MODES = [
|
|
2941
|
+
'marker',
|
|
2942
|
+
'polyline',
|
|
2943
|
+
'polygon',
|
|
2944
|
+
'circle'
|
|
2945
|
+
];
|
|
2946
|
+
function isDrawableMode(mode) {
|
|
2947
|
+
return DRAWABLE_MODES.includes(mode);
|
|
2948
|
+
}
|
|
2949
|
+
/**
|
|
2950
|
+
* Replacement for the removed `google.maps.drawing.DrawingManager`
|
|
2951
|
+
* (the Drawing Library was discontinued in Maps JS API v3.65):
|
|
2952
|
+
* draws markers, polylines, polygons and circles with plain map events.
|
|
2953
|
+
*
|
|
2954
|
+
* Click places a marker / a vertex / a circle center; for circles the
|
|
2955
|
+
* radius follows the cursor and a second click fixes it; polylines and
|
|
2956
|
+
* polygons are finished with a double click. The completed shape is
|
|
2957
|
+
* passed to `onComplete` and removed from the map — the caller
|
|
2958
|
+
* re-creates it from state, exactly as with DrawingManager overlays.
|
|
2959
|
+
*/ class DrawingController {
|
|
2960
|
+
setMode(mode) {
|
|
2961
|
+
const nextMode = isDrawableMode(mode) ? mode : null;
|
|
2962
|
+
if (nextMode === this.mode) {
|
|
2963
|
+
return;
|
|
2964
|
+
}
|
|
2965
|
+
this.cancel();
|
|
2966
|
+
this.unbind();
|
|
2967
|
+
this.mode = nextMode;
|
|
2968
|
+
if (nextMode) {
|
|
2969
|
+
this.bind();
|
|
2970
|
+
this.map.setOptions({
|
|
2971
|
+
draggableCursor: 'crosshair',
|
|
2972
|
+
disableDoubleClickZoom: true
|
|
2973
|
+
});
|
|
2974
|
+
} else {
|
|
2975
|
+
this.map.setOptions({
|
|
2976
|
+
draggableCursor: null,
|
|
2977
|
+
disableDoubleClickZoom: false
|
|
2978
|
+
});
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
destruct() {
|
|
2982
|
+
this.cancel();
|
|
2983
|
+
this.unbind();
|
|
2984
|
+
this.mode = null;
|
|
2985
|
+
}
|
|
2986
|
+
bind() {
|
|
2987
|
+
this.listeners = [
|
|
2988
|
+
this.map.addListener('click', (e)=>this.onClick(e)),
|
|
2989
|
+
this.map.addListener('mousemove', (e)=>this.onMove(e)),
|
|
2990
|
+
this.map.addListener('dblclick', ()=>this.onDblClick())
|
|
2991
|
+
];
|
|
2992
|
+
}
|
|
2993
|
+
unbind() {
|
|
2994
|
+
this.listeners.forEach((listener)=>listener.remove());
|
|
2995
|
+
this.listeners = [];
|
|
2996
|
+
}
|
|
2997
|
+
onClick(e) {
|
|
2998
|
+
const point = e.latLng;
|
|
2999
|
+
if (!point) {
|
|
3000
|
+
return;
|
|
3001
|
+
}
|
|
3002
|
+
switch(this.mode){
|
|
3003
|
+
case 'marker':
|
|
3004
|
+
this.onComplete(new google.maps.Marker({
|
|
3005
|
+
position: point
|
|
3006
|
+
}));
|
|
3007
|
+
break;
|
|
3008
|
+
case 'circle':
|
|
3009
|
+
if (!this.previewCircle) {
|
|
3010
|
+
this.previewCircle = new google.maps.Circle((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_2__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({}, this.defaultStates.circle), {
|
|
3011
|
+
center: point,
|
|
3012
|
+
radius: 0,
|
|
3013
|
+
clickable: false,
|
|
3014
|
+
map: this.map
|
|
3015
|
+
}));
|
|
3016
|
+
} else {
|
|
3017
|
+
this.finishCircle();
|
|
3018
|
+
}
|
|
3019
|
+
break;
|
|
3020
|
+
case 'polyline':
|
|
3021
|
+
case 'polygon':
|
|
3022
|
+
this.vertices.push(point);
|
|
3023
|
+
this.updatePolyPreview(point);
|
|
3024
|
+
break;
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
onMove(e) {
|
|
3028
|
+
const point = e.latLng;
|
|
3029
|
+
if (!point) {
|
|
3030
|
+
return;
|
|
3031
|
+
}
|
|
3032
|
+
if (this.previewCircle) {
|
|
3033
|
+
const center = this.previewCircle.getCenter();
|
|
3034
|
+
center && this.previewCircle.setRadius(google.maps.geometry.spherical.computeDistanceBetween(center, point));
|
|
3035
|
+
return;
|
|
3036
|
+
}
|
|
3037
|
+
if (this.vertices.length) {
|
|
3038
|
+
this.updatePolyPreview(point);
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
onDblClick() {
|
|
3042
|
+
if (this.mode !== 'polyline' && this.mode !== 'polygon') {
|
|
3043
|
+
return;
|
|
3044
|
+
}
|
|
3045
|
+
// The double click is preceded by two single clicks at the same
|
|
3046
|
+
// point — collapse the duplicated trailing vertices
|
|
3047
|
+
const path = this.vertices.filter((point, i, list)=>i === 0 || !point.equals(list[i - 1]));
|
|
3048
|
+
const minPoints = this.mode === 'polygon' ? 3 : 2;
|
|
3049
|
+
if (path.length >= minPoints && this.preview) {
|
|
3050
|
+
const shape = this.preview;
|
|
3051
|
+
shape.setPath(path);
|
|
3052
|
+
this.onComplete(shape);
|
|
3053
|
+
}
|
|
3054
|
+
this.cancel();
|
|
3055
|
+
}
|
|
3056
|
+
finishCircle() {
|
|
3057
|
+
const circle = this.previewCircle;
|
|
3058
|
+
if (circle) {
|
|
3059
|
+
this.previewCircle = null;
|
|
3060
|
+
this.onComplete(circle);
|
|
3061
|
+
circle.setMap(null);
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
updatePolyPreview(cursor) {
|
|
3065
|
+
const path = [
|
|
3066
|
+
...this.vertices,
|
|
3067
|
+
cursor
|
|
3068
|
+
];
|
|
3069
|
+
if (!this.preview) {
|
|
3070
|
+
const options = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_2__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({}, this.defaultStates[this.mode === 'polygon' ? 'polygon' : 'polyline']), {
|
|
3071
|
+
clickable: false,
|
|
3072
|
+
map: this.map
|
|
3073
|
+
});
|
|
3074
|
+
this.preview = this.mode === 'polygon' ? new google.maps.Polygon(options) : new google.maps.Polyline(options);
|
|
3075
|
+
}
|
|
3076
|
+
this.preview.setPath(path);
|
|
3077
|
+
}
|
|
3078
|
+
cancel() {
|
|
3079
|
+
var _this_preview, _this_previewCircle;
|
|
3080
|
+
(_this_preview = this.preview) === null || _this_preview === void 0 ? void 0 : _this_preview.setMap(null);
|
|
3081
|
+
this.preview = null;
|
|
3082
|
+
(_this_previewCircle = this.previewCircle) === null || _this_previewCircle === void 0 ? void 0 : _this_previewCircle.setMap(null);
|
|
3083
|
+
this.previewCircle = null;
|
|
3084
|
+
this.vertices = [];
|
|
3085
|
+
}
|
|
3086
|
+
constructor(map, defaultStates, onComplete){
|
|
3087
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "map", void 0);
|
|
3088
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "defaultStates", void 0);
|
|
3089
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "onComplete", void 0);
|
|
3090
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "mode", void 0);
|
|
3091
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "listeners", void 0);
|
|
3092
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "preview", void 0);
|
|
3093
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "previewCircle", void 0);
|
|
3094
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "vertices", void 0);
|
|
3095
|
+
this.map = map;
|
|
3096
|
+
this.defaultStates = defaultStates;
|
|
3097
|
+
this.onComplete = onComplete;
|
|
3098
|
+
this.mode = null;
|
|
3099
|
+
this.listeners = [];
|
|
3100
|
+
this.preview = null;
|
|
3101
|
+
this.previewCircle = null;
|
|
3102
|
+
this.vertices = [];
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
|
|
2938
3107
|
/***/ }),
|
|
2939
3108
|
|
|
2940
3109
|
/***/ 1475:
|