Skip to content

Commit

Permalink
Fixed drag and drop bug #363
Browse files Browse the repository at this point in the history
  • Loading branch information
givanz committed Jul 3, 2024
1 parent 2ac3e7d commit 5fd7ebd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/builder/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ Vvveb.Builder = {

self.highlightEnabled = true;

self.leftPanelWidth = document.getElementById("left-panel").width;
self.leftPanelWidth = document.getElementById("left-panel").clientWidth;

self.adjustListsHeight();

Expand Down Expand Up @@ -1437,7 +1437,7 @@ Vvveb.Builder = {
try {
if ((pos.top < (y - halfHeight)) || (pos.left < (x - halfWidth))) {
if (noChildren[parentTagName]) {
self.dragElement.after(parent);
parent.after(self.dragElement);
} else {
if (parent == self.dragElement.parenNode) {
parent.appendChild(self.dragElement);
Expand Down

0 comments on commit 5fd7ebd

Please sign in to comment.