Skip to content

Commit

Permalink
v0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
TahaSh committed Aug 28, 2024
1 parent 2dd4963 commit d348da3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
34 changes: 20 additions & 14 deletions dist/swapy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2568,8 +2568,8 @@ class Mt extends rt {
this._initialPointer = new u(e, i), this.getViews().forEach((s) => {
this._pointerDownPerView.set(s.id, s.intersects(e, i)), this._targetPerView.set(s.id, r);
const o = new u(
e - s.position.x,
i - s.position.y
e - s.position.initialX,
i - s.position.initialY
);
this._pointerX = e, this._pointerY = i, this._initialPointerPerView.set(s.id, o);
});
Expand Down Expand Up @@ -2792,7 +2792,7 @@ const N = (n) => {
o.set(E.dataset.swapySlot, g.element.dataset.swapyItem);
}
n.onViewAdded((g) => {
n.initialized && g.name === "item" && (L(g), S(), r = n.getViews("item"), l = new Map(o), n.emit(tt, { data: K(o) }));
n.initialized && g.name === "item" && (L(g), S(), r = n.getViews("item"), l = new Map(o), n.emit(tt, { data: K(o) })), g.name === "slot" && (i = n.getViews("slot"));
});
function S() {
const g = C();
Expand Down Expand Up @@ -2891,21 +2891,27 @@ function De(n, t = {}) {
}
function qe(n) {
const t = Array.from(
n.querySelectorAll("[data-swapy-slot]:not([data-vel-view])")
);
t.forEach((i) => {
i.dataset.velView = "slot";
});
const e = Array.from(
n.querySelectorAll("[data-swapy-item]:not([data-vel-view]")
);
return t.forEach((e) => {
e.dataset.velView = "item", e.dataset.velLayoutId = e.dataset.swapyItem;
const i = e.querySelector("[data-swapy-handle]");
i && (i.dataset.velView = "handle"), Array.from(
e.querySelectorAll("[data-swapy-text]")
).forEach((o) => {
o.dataset.velLayoutPosition = "";
return e.forEach((i) => {
i.dataset.velView = "item", i.dataset.velLayoutId = i.dataset.swapyItem;
const r = i.querySelector("[data-swapy-handle]");
r && (r.dataset.velView = "handle"), Array.from(
i.querySelectorAll("[data-swapy-text]")
).forEach((l) => {
l.dataset.velLayoutPosition = "";
}), Array.from(
e.querySelectorAll("[data-swapy-exclude]")
).forEach((o) => {
o.dataset.velIgnore = "";
i.querySelectorAll("[data-swapy-exclude]")
).forEach((l) => {
l.dataset.velIgnore = "";
});
}), t.length > 0;
}), e.length > 0 || t.length > 0;
}
function Ye(n, t = {}) {
if (!n)
Expand Down
2 changes: 1 addition & 1 deletion dist/swapy.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "swapy",
"author": "Taha Shashtari (taha@tahazsh.com)",
"private": false,
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"main": "./dist/swapy.min.js",
"module": "./dist/swapy.js",
Expand Down

0 comments on commit d348da3

Please sign in to comment.