From 873114ba0b0d619e5be6c020ab1e545f772aaf99 Mon Sep 17 00:00:00 2001 From: Brian Sosnowski <56844125+SonoranBrian@users.noreply.github.com> Date: Thu, 8 Jul 2021 01:15:46 -0700 Subject: [PATCH 1/3] Update Vue3DraggableResizable.ts add native drag support --- src/components/Vue3DraggableResizable.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Vue3DraggableResizable.ts b/src/components/Vue3DraggableResizable.ts index 3966e24..09a44ba 100644 --- a/src/components/Vue3DraggableResizable.ts +++ b/src/components/Vue3DraggableResizable.ts @@ -127,6 +127,10 @@ const VdrProps = { lockAspectRatio: { type: Boolean, default: false + }, + enableNativeDrag: { + type: Boolean, + default: false } } @@ -219,7 +223,9 @@ const VueDraggableResizable = defineComponent({ }, mounted() { if (!this.containerRef) return - this.containerRef.ondragstart = () => false + if (!this.enableNativeDrag) { + this.containerRef.ondragstart = () => false + } const { width, height } = getElSize(this.containerRef) this.setWidth(this.initW === null ? this.w || width : this.initW) this.setHeight(this.initH === null ? this.h || height : this.initH) From d6a096e995d6bc6d9f0615753d92cead652b49d7 Mon Sep 17 00:00:00 2001 From: Brian Sosnowski <56844125+SonoranBrian@users.noreply.github.com> Date: Thu, 8 Jul 2021 02:11:16 -0700 Subject: [PATCH 2/3] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index b699caf..98cc9d4 100644 --- a/README.md +++ b/README.md @@ -428,6 +428,17 @@ following handle nodes will be rendered ... ``` +#### enableNativeDrag +Type: `Boolean`
+Required: `false`
+Default: `false` + +By default, the browser's native drag and drop funcionality (usually used for images and some other elements) is disabled, as it may conflict with the one provided by the component. If you need, for whatever reason, to have this functionality back you can set this prop to `true`. + +```html + +``` + ### Events #### activated From 1435c298049481f8797884f9ef77b69f7d3eca44 Mon Sep 17 00:00:00 2001 From: Brian Sosnowski <56844125+SonoranBrian@users.noreply.github.com> Date: Sun, 11 Jul 2021 22:24:45 -0700 Subject: [PATCH 3/3] Update index.css Remove borders --- src/components/index.css | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/components/index.css b/src/components/index.css index 7035edb..85571e2 100644 --- a/src/components/index.css +++ b/src/components/index.css @@ -1,15 +1,5 @@ .vdr-container { position: absolute; - border: 1px solid transparent; - box-sizing: border-box; -} -.vdr-container.active { - border-color: #000; - border-style: dashed; -} -.vdr-container.dragging { - border-color: #000; - border-style: solid; } .vdr-handle { box-sizing: border-box;