From 2ec4ac30fca12f0be9c6ec98a43d08c9fd2288ac Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 29 Aug 2023 21:26:57 +0000 Subject: [PATCH] improve draggable item generalization --- scripts/config.js | 10 ++++++---- scripts/draggable.js | 10 ++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/scripts/config.js b/scripts/config.js index c614a1c..7d3b806 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -760,10 +760,12 @@ function addBootLine (container, data, before = null) { const item = document.createElement("draggable-item"); item.data = data; item.innerHTML = ` - - -

${data.id}

-

${data.detail}

+
+ + +

${data.id}

+

${data.detail}

+
`; item.draggable = true; item.classList.add("drop-target"); diff --git a/scripts/draggable.js b/scripts/draggable.js index 96f51eb..f34f26f 100644 --- a/scripts/draggable.js +++ b/scripts/draggable.js @@ -64,12 +64,6 @@ class DraggableItem extends HTMLElement { // for whatever reason, only grid layout seems to respect the parent's content bounds this.shadowRoot.innerHTML = `