From a48a2d97047c97eb34ed766b90f9d9b78e6c0a78 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Wed, 3 May 2023 10:02:48 +0200 Subject: [PATCH] - npm updated (babel_core) - correct imports for DomEvent in draw.component.vue --- package-lock.json | 32 +++++++++---------- .../js/Components/Map/draw.component.vue | 19 ++++++----- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index e40c1bb..7ec31ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -767,9 +767,9 @@ } }, "node_modules/@babel/core": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.5.tgz", - "integrity": "sha512-9M398B/QH5DlfCOTKDZT1ozXr0x8uBEeFd+dJraGUZGiaNpGCDVGCc14hZexsMblw3XxltJ+6kSvogp9J+5a9g==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.8.tgz", + "integrity": "sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -778,7 +778,7 @@ "@babel/helper-compilation-targets": "^7.21.5", "@babel/helper-module-transforms": "^7.21.5", "@babel/helpers": "^7.21.5", - "@babel/parser": "^7.21.5", + "@babel/parser": "^7.21.8", "@babel/template": "^7.20.7", "@babel/traverse": "^7.21.5", "@babel/types": "^7.21.5", @@ -873,9 +873,9 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.5.tgz", - "integrity": "sha512-yNSEck9SuDvPTEUYm4BSXl6ZVC7yO5ZLEMAhG3v3zi7RDxyL/nQDemWWZmw4L0stPWwhpnznRRyJHPRcbXR2jw==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.8.tgz", + "integrity": "sha512-+THiN8MqiH2AczyuZrnrKL6cAxFRRQDKW9h1YkBvbgKmAm6mwiacig1qT73DHIWMGo40GRnsEfN3LA+E6NtmSw==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", @@ -905,9 +905,9 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.5.tgz", - "integrity": "sha512-1+DPMcln46eNAta/rPIqQYXYRGvQ/LRy6bRKnSt9Dzt/yLjNUbbsh+6yzD6fUHmtzc9kWvVnAhtcMSMyziHmUA==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.8.tgz", + "integrity": "sha512-zGuSdedkFtsFHGbexAvNuipg1hbtitDLo2XE8/uf6Y9sOQV1xsYX/2pNbtedp/X0eU1pIt+kGvaqHCowkRbS5g==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", @@ -1196,9 +1196,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.5.tgz", - "integrity": "sha512-J+IxH2IsxV4HbnTrSWgMAQj0UEo61hDA4Ny8h8PCX0MLXiibqHbqIOVneqdocemSBc22VpBKxt4J6FQzy9HarQ==", + "version": "7.21.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.8.tgz", + "integrity": "sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -7541,9 +7541,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.379", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.379.tgz", - "integrity": "sha512-eRMq6Cf4PhjB14R9U6QcXM/VRQ54Gc3OL9LKnFugUIh2AXm3KJlOizlSfVIgjH76bII4zHGK4t0PVTE5qq8dZg==", + "version": "1.4.380", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.380.tgz", + "integrity": "sha512-XKGdI4pWM78eLH2cbXJHiBnWUwFSzZM7XujsB6stDiGu9AeSqziedP6amNLpJzE3i0rLTcfAwdCTs5ecP5yeSg==", "dev": true }, "node_modules/emittery": { diff --git a/resources/js/Components/Map/draw.component.vue b/resources/js/Components/Map/draw.component.vue index 78883a8..b56e842 100644 --- a/resources/js/Components/Map/draw.component.vue +++ b/resources/js/Components/Map/draw.component.vue @@ -25,7 +25,7 @@ import { MapService } from '@/Stores/map.service'; import { Map } from 'leaflet/src/map/index'; // import { LayerGroup } from 'leaflet/src/layer/LayerGroup'; // 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 { 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, // handler can't event.preventDefault // 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('touchmove', this._onMouseMove, this); - DomEvent.off(document, 'mouseup', this._onMouseUp, this); - DomEvent.off(document, 'touchend', this._onMouseUp, this); + off(document, 'mouseup', 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 (this._shape) { @@ -183,9 +183,12 @@ export default class DrawControlComponent extends Vue { this._isDrawing = true; this._startLatLng = e.latlng; - DomEvent.on(document, 'mouseup', this._onMouseUp, this) - .on(document, 'touchend', this._onMouseUp, this) - .preventDefault(e.originalEvent); + // DomEvent.on(document, 'mouseup', this._onMouseUp, this) + // .on(document, 'touchend', this._onMouseUp, this) + // .preventDefault(e.originalEvent); + on(document, 'mouseup', this._onMouseUp, this); + on(document, 'touchend', this._onMouseUp, this); + preventDefault(e.originalEvent); } private _onMouseMove(e) {