svelte-dnd-action
Advanced tools
Comparing version 0.9.31 to 0.9.32
@@ -46,3 +46,3 @@ { | ||
"description": "*An awesome drag and drop library for Svelte 3 and 4 (not using the browser's built-in dnd, thanks god): Rich animations, nested containers, touch support and more *", | ||
"version": "0.9.31", | ||
"version": "0.9.32", | ||
"repository": { | ||
@@ -49,0 +49,0 @@ "type": "git", |
@@ -20,13 +20,25 @@ /** | ||
if (selects.length <= 0) { | ||
return cloned; | ||
if (selects.length > 0) { | ||
const clonedSelects = elIsSelect ? [cloned] : [...cloned.querySelectorAll("select")]; | ||
for (let i = 0; i < clonedSelects.length; i++) { | ||
const select = clonedSelects[i]; | ||
const value = values[i]; | ||
const optionEl = select.querySelector(`option[value="${value}"`); | ||
if (optionEl) { | ||
optionEl.setAttribute("selected", true); | ||
} | ||
} | ||
} | ||
const clonedSelects = elIsSelect ? [cloned] : [...cloned.querySelectorAll("select")]; | ||
for (let i = 0; i < clonedSelects.length; i++) { | ||
const select = clonedSelects[i]; | ||
const value = values[i]; | ||
const optionEl = select.querySelector(`option[value="${value}"`); | ||
if (optionEl) { | ||
optionEl.setAttribute("selected", true); | ||
const elIsCanvas = el.tagName === "CANVAS"; | ||
const canvases = elIsCanvas ? [el] : [...el.querySelectorAll("canvas")]; | ||
if(canvases.length > 0) | ||
{ | ||
const clonedCanvases = elIsCanvas ? [cloned] : [...cloned.querySelectorAll("canvas")]; | ||
for (let i = 0; i < clonedCanvases.length; i++) { | ||
const canvas = canvases[i]; | ||
const clonedCanvas = clonedCanvases[i]; | ||
clonedCanvas.width = canvas.width; | ||
clonedCanvas.height = canvas.height; | ||
clonedCanvas.getContext("2d").drawImage(canvas,0,0); | ||
} | ||
@@ -33,0 +45,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
294381
6846