- npm updated (babel_core)

- correct imports for DomEvent in draw.component.vue
This commit is contained in:
Kaimbacher 2023-05-03 10:02:48 +02:00
parent e110826e1a
commit a48a2d9704
2 changed files with 27 additions and 24 deletions

32
package-lock.json generated
View File

@ -767,9 +767,9 @@
} }
}, },
"node_modules/@babel/core": { "node_modules/@babel/core": {
"version": "7.21.5", "version": "7.21.8",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.5.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.8.tgz",
"integrity": "sha512-9M398B/QH5DlfCOTKDZT1ozXr0x8uBEeFd+dJraGUZGiaNpGCDVGCc14hZexsMblw3XxltJ+6kSvogp9J+5a9g==", "integrity": "sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@ampproject/remapping": "^2.2.0", "@ampproject/remapping": "^2.2.0",
@ -778,7 +778,7 @@
"@babel/helper-compilation-targets": "^7.21.5", "@babel/helper-compilation-targets": "^7.21.5",
"@babel/helper-module-transforms": "^7.21.5", "@babel/helper-module-transforms": "^7.21.5",
"@babel/helpers": "^7.21.5", "@babel/helpers": "^7.21.5",
"@babel/parser": "^7.21.5", "@babel/parser": "^7.21.8",
"@babel/template": "^7.20.7", "@babel/template": "^7.20.7",
"@babel/traverse": "^7.21.5", "@babel/traverse": "^7.21.5",
"@babel/types": "^7.21.5", "@babel/types": "^7.21.5",
@ -873,9 +873,9 @@
} }
}, },
"node_modules/@babel/helper-create-class-features-plugin": { "node_modules/@babel/helper-create-class-features-plugin": {
"version": "7.21.5", "version": "7.21.8",
"resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.5.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.8.tgz",
"integrity": "sha512-yNSEck9SuDvPTEUYm4BSXl6ZVC7yO5ZLEMAhG3v3zi7RDxyL/nQDemWWZmw4L0stPWwhpnznRRyJHPRcbXR2jw==", "integrity": "sha512-+THiN8MqiH2AczyuZrnrKL6cAxFRRQDKW9h1YkBvbgKmAm6mwiacig1qT73DHIWMGo40GRnsEfN3LA+E6NtmSw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-annotate-as-pure": "^7.18.6", "@babel/helper-annotate-as-pure": "^7.18.6",
@ -905,9 +905,9 @@
} }
}, },
"node_modules/@babel/helper-create-regexp-features-plugin": { "node_modules/@babel/helper-create-regexp-features-plugin": {
"version": "7.21.5", "version": "7.21.8",
"resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.5.tgz", "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.8.tgz",
"integrity": "sha512-1+DPMcln46eNAta/rPIqQYXYRGvQ/LRy6bRKnSt9Dzt/yLjNUbbsh+6yzD6fUHmtzc9kWvVnAhtcMSMyziHmUA==", "integrity": "sha512-zGuSdedkFtsFHGbexAvNuipg1hbtitDLo2XE8/uf6Y9sOQV1xsYX/2pNbtedp/X0eU1pIt+kGvaqHCowkRbS5g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-annotate-as-pure": "^7.18.6", "@babel/helper-annotate-as-pure": "^7.18.6",
@ -1196,9 +1196,9 @@
} }
}, },
"node_modules/@babel/parser": { "node_modules/@babel/parser": {
"version": "7.21.5", "version": "7.21.8",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.5.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz",
"integrity": "sha512-J+IxH2IsxV4HbnTrSWgMAQj0UEo61hDA4Ny8h8PCX0MLXiibqHbqIOVneqdocemSBc22VpBKxt4J6FQzy9HarQ==", "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==",
"bin": { "bin": {
"parser": "bin/babel-parser.js" "parser": "bin/babel-parser.js"
}, },
@ -7541,9 +7541,9 @@
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.379", "version": "1.4.380",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.379.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.380.tgz",
"integrity": "sha512-eRMq6Cf4PhjB14R9U6QcXM/VRQ54Gc3OL9LKnFugUIh2AXm3KJlOizlSfVIgjH76bII4zHGK4t0PVTE5qq8dZg==", "integrity": "sha512-XKGdI4pWM78eLH2cbXJHiBnWUwFSzZM7XujsB6stDiGu9AeSqziedP6amNLpJzE3i0rLTcfAwdCTs5ecP5yeSg==",
"dev": true "dev": true
}, },
"node_modules/emittery": { "node_modules/emittery": {

View File

@ -25,7 +25,7 @@ import { MapService } from '@/Stores/map.service';
import { Map } from 'leaflet/src/map/index'; import { Map } from 'leaflet/src/map/index';
// import { LayerGroup } from 'leaflet/src/layer/LayerGroup'; // import { LayerGroup } from 'leaflet/src/layer/LayerGroup';
// import { LatLngBounds, Rectangle } from 'leaflet'; // import { LatLngBounds, Rectangle } from 'leaflet';
import * as DomEvent from 'leaflet/src/dom/DomEvent'; import { on, off , preventDefault } from 'leaflet/src/dom/DomEvent';
import { Rectangle } from 'leaflet/src/layer/vector/Rectangle'; import { Rectangle } from 'leaflet/src/layer/vector/Rectangle';
import { LatLngBounds } from 'leaflet/src/geo/LatLngBounds'; import { LatLngBounds } from 'leaflet/src/geo/LatLngBounds';
@ -141,7 +141,7 @@ export default class DrawControlComponent extends Vue {
// (update): we have to send passive now to prevent scroll, because by default it is {passive: true} now, which means, // (update): we have to send passive now to prevent scroll, because by default it is {passive: true} now, which means,
// handler can't event.preventDefault // handler can't event.preventDefault
// check the news https://developers.google.com/web/updates/2016/06/passive-event-listeners // check the news https://developers.google.com/web/updates/2016/06/passive-event-listeners
document.addEventListener('touchstart', DomEvent.preventDefault, { passive: false }); document.addEventListener('touchstart', preventDefault, { passive: false });
} }
} }
@ -164,10 +164,10 @@ export default class DrawControlComponent extends Vue {
.off('touchstart', this._onMouseDown, this) .off('touchstart', this._onMouseDown, this)
.off('touchmove', this._onMouseMove, this); .off('touchmove', this._onMouseMove, this);
DomEvent.off(document, 'mouseup', this._onMouseUp, this); off(document, 'mouseup', this._onMouseUp, this);
DomEvent.off(document, 'touchend', this._onMouseUp, this); off(document, 'touchend', this._onMouseUp, this);
document.removeEventListener('touchstart', DomEvent.preventDefault); document.removeEventListener('touchstart', preventDefault);
// If the box element doesn't exist they must not have moved the mouse, so don't need to destroy/return // If the box element doesn't exist they must not have moved the mouse, so don't need to destroy/return
// if (this._shape) { // if (this._shape) {
@ -183,9 +183,12 @@ export default class DrawControlComponent extends Vue {
this._isDrawing = true; this._isDrawing = true;
this._startLatLng = e.latlng; this._startLatLng = e.latlng;
DomEvent.on(document, 'mouseup', this._onMouseUp, this) // DomEvent.on(document, 'mouseup', this._onMouseUp, this)
.on(document, 'touchend', this._onMouseUp, this) // .on(document, 'touchend', this._onMouseUp, this)
.preventDefault(e.originalEvent); // .preventDefault(e.originalEvent);
on(document, 'mouseup', this._onMouseUp, this);
on(document, 'touchend', this._onMouseUp, this);
preventDefault(e.originalEvent);
} }
private _onMouseMove(e) { private _onMouseMove(e) {