uiik 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * uiik v1.3.6
2
+ * uiik v1.3.7
3
3
  * A UI interactions kit includes draggable, splittable, rotatable, selectable, etc.
4
4
  * https://github.com/holyhigh2/uiik
5
5
  * c) 2021-2025 @holyhigh2 may be freely distributed under the MIT license
@@ -984,7 +984,6 @@ class Resizable extends Uii {
984
984
  super(els, assign({
985
985
  handleSize: 8,
986
986
  minSize: 50,
987
- dir: ["n", "s", "e", "w", "ne", "nw", "se", "sw"],
988
987
  ghost: false,
989
988
  offset: 0,
990
989
  }, opts));
@@ -1428,6 +1427,7 @@ class Resizable extends Uii {
1428
1427
  }
1429
1428
  lastX = x;
1430
1429
  lastY = y;
1430
+ console.log(lastX, lastY);
1431
1431
  currentW = w;
1432
1432
  currentH = h;
1433
1433
  if (onResize && onResize.call) {
@@ -1456,11 +1456,12 @@ class Resizable extends Uii {
1456
1456
  var _a, _b;
1457
1457
  const { ev } = args;
1458
1458
  if (ghost && ghostNode) {
1459
- ((_a = panel.parentNode) === null || _a === void 0 ? void 0 : _a.contains(ghostNode)) &&
1460
- ((_b = panel.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(ghostNode));
1461
1459
  panelStyle.left = ghostNode.style.left;
1462
1460
  panelStyle.top = ghostNode.style.top;
1463
- moveTo(panel, lastX / matrixInfo.scale, lastY / matrixInfo.scale);
1461
+ transform = wrapper(panel);
1462
+ transform.moveTo((lastX + sX), (lastY + sY));
1463
+ ((_a = panel.parentNode) === null || _a === void 0 ? void 0 : _a.contains(ghostNode)) &&
1464
+ ((_b = panel.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(ghostNode));
1464
1465
  resize(transform, panelStyle, parseFloat(ghostNode.style.width), parseFloat(ghostNode.style.height));
1465
1466
  }
1466
1467
  if (setOrigin)
@@ -1502,7 +1503,7 @@ class Resizable extends Uii {
1502
1503
  handles = handleStr(panel);
1503
1504
  }
1504
1505
  if (!handles) {
1505
- console.error('Can not find handles with "' + panel.outerHTML + '"');
1506
+ console.error('Can not find handles in "' + panel.outerHTML + '"');
1506
1507
  return;
1507
1508
  }
1508
1509
  handles = isArrayLike(handles) ? handles : [handles];
@@ -2972,7 +2973,7 @@ function newSortable(container, opts) {
2972
2973
  return new Sortable(container, opts);
2973
2974
  }
2974
2975
 
2975
- var version = "1.3.6";
2976
+ var version = "1.3.7";
2976
2977
  var repository = {
2977
2978
  type: "git",
2978
2979
  url: "https://github.com/holyhigh2/uiik"
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * uiik v1.3.6
2
+ * uiik v1.3.7
3
3
  * A UI interactions kit includes draggable, splittable, rotatable, selectable, etc.
4
4
  * https://github.com/holyhigh2/uiik
5
5
  * c) 2021-2025 @holyhigh2 may be freely distributed under the MIT license
@@ -981,7 +981,6 @@
981
981
  super(els, object.assign({
982
982
  handleSize: 8,
983
983
  minSize: 50,
984
- dir: ["n", "s", "e", "w", "ne", "nw", "se", "sw"],
985
984
  ghost: false,
986
985
  offset: 0,
987
986
  }, opts));
@@ -1425,6 +1424,7 @@
1425
1424
  }
1426
1425
  lastX = x;
1427
1426
  lastY = y;
1427
+ console.log(lastX, lastY);
1428
1428
  currentW = w;
1429
1429
  currentH = h;
1430
1430
  if (onResize && onResize.call) {
@@ -1453,11 +1453,12 @@
1453
1453
  var _a, _b;
1454
1454
  const { ev } = args;
1455
1455
  if (ghost && ghostNode) {
1456
- ((_a = panel.parentNode) === null || _a === void 0 ? void 0 : _a.contains(ghostNode)) &&
1457
- ((_b = panel.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(ghostNode));
1458
1456
  panelStyle.left = ghostNode.style.left;
1459
1457
  panelStyle.top = ghostNode.style.top;
1460
- moveTo(panel, lastX / matrixInfo.scale, lastY / matrixInfo.scale);
1458
+ transform = wrapper(panel);
1459
+ transform.moveTo((lastX + sX), (lastY + sY));
1460
+ ((_a = panel.parentNode) === null || _a === void 0 ? void 0 : _a.contains(ghostNode)) &&
1461
+ ((_b = panel.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(ghostNode));
1461
1462
  resize(transform, panelStyle, parseFloat(ghostNode.style.width), parseFloat(ghostNode.style.height));
1462
1463
  }
1463
1464
  if (setOrigin)
@@ -1499,7 +1500,7 @@
1499
1500
  handles = handleStr(panel);
1500
1501
  }
1501
1502
  if (!handles) {
1502
- console.error('Can not find handles with "' + panel.outerHTML + '"');
1503
+ console.error('Can not find handles in "' + panel.outerHTML + '"');
1503
1504
  return;
1504
1505
  }
1505
1506
  handles = is.isArrayLike(handles) ? handles : [handles];
@@ -2969,7 +2970,7 @@
2969
2970
  return new Sortable(container, opts);
2970
2971
  }
2971
2972
 
2972
- var version = "1.3.6";
2973
+ var version = "1.3.7";
2973
2974
  var repository = {
2974
2975
  type: "git",
2975
2976
  url: "https://github.com/holyhigh2/uiik"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uiik",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "A UI interactions kit includes draggable, splittable, rotatable, selectable, etc.",
5
5
  "main": "index.js",
6
6
  "module": "index.esm.js",
package/types.d.ts CHANGED
@@ -21,10 +21,9 @@ export declare abstract class Uii {
21
21
  protected onOptionChanged(opts?: Record<string, any>): void;
22
22
  }
23
23
  export type ResizableOptions = {
24
- handle?: ((target: HTMLElement | SVGGraphicsElement) => NodeList | HTMLCollection | HTMLElement[] | HTMLElement | SVGGraphicsElement) | string | NodeList | HTMLCollection | HTMLElement[] | HTMLElement | SVGGraphicsElement;
24
+ handle: ((target: HTMLElement | SVGGraphicsElement) => NodeList | HTMLCollection | HTMLElement[] | HTMLElement | SVGGraphicsElement) | string | NodeList | HTMLCollection | HTMLElement[] | HTMLElement | SVGGraphicsElement;
25
25
  minSize?: number | Array<number>;
26
26
  maxSize?: number | Array<number>;
27
- dir?: string[];
28
27
  aspectRatio?: number;
29
28
  ghost?: boolean | Function;
30
29
  ghostClass?: string;