@dflex/core-instance
Advanced tools
Comparing version 2.2.2 to 2.5.0
@@ -48,4 +48,8 @@ import type { Keys, Order } from "@dflex/dom-gen"; | ||
private initIndicators; | ||
private mergeOffset; | ||
getOffset(): Offset; | ||
getOffset(): { | ||
height: number; | ||
width: number; | ||
left: number; | ||
top: number; | ||
}; | ||
private updateCurrentIndicators; | ||
@@ -58,3 +62,3 @@ transformElm(): void; | ||
*/ | ||
private updateIndex; | ||
private updateOrderIndexing; | ||
assignNewPosition(branchIDsOrder: string[], newIndex: number, oldIndex?: number): void; | ||
@@ -61,0 +65,0 @@ /** |
@@ -108,9 +108,9 @@ "use strict"; | ||
}; | ||
CoreInstance.prototype.mergeOffset = function () { | ||
this.offset.top = this.currentTop; | ||
this.offset.left = this.currentLeft; | ||
}; | ||
CoreInstance.prototype.getOffset = function () { | ||
this.mergeOffset(); | ||
return this.offset; | ||
return { | ||
height: this.offset.height, | ||
width: this.offset.width, | ||
left: this.currentLeft, | ||
top: this.currentTop, | ||
}; | ||
}; | ||
@@ -136,3 +136,3 @@ CoreInstance.prototype.updateCurrentIndicators = function (topSpace, leftSpace) { | ||
*/ | ||
CoreInstance.prototype.updateIndex = function (i) { | ||
CoreInstance.prototype.updateOrderIndexing = function (i) { | ||
var oldIndex = this.order.self; | ||
@@ -144,2 +144,3 @@ var newIndex = oldIndex + i; | ||
CoreInstance.prototype.assignNewPosition = function (branchIDsOrder, newIndex, oldIndex) { | ||
// TODO: Add this to confusion mode:newIndex < 0) | ||
branchIDsOrder[newIndex] = this.id; | ||
@@ -189,3 +190,3 @@ if (oldIndex !== undefined) | ||
this.seTranslate(sign * topSpace, operationID); | ||
var _a = this.updateIndex(sign * vIncrement), oldIndex = _a.oldIndex, newIndex = _a.newIndex; | ||
var _a = this.updateOrderIndexing(sign * vIncrement), oldIndex = _a.oldIndex, newIndex = _a.newIndex; | ||
this.assignNewPosition(iDsInOrder, newIndex, isShuffle ? oldIndex : undefined); | ||
@@ -207,3 +208,3 @@ }; | ||
this.seTranslate(topSpace); | ||
this.updateIndex(increment); | ||
this.updateOrderIndexing(increment); | ||
}; | ||
@@ -210,0 +211,0 @@ return CoreInstance; |
{ | ||
"name": "@dflex/core-instance", | ||
"version": "2.2.2", | ||
"version": "2.5.0", | ||
"main": "dist/index.js", | ||
@@ -42,3 +42,3 @@ "types": "dist/index.d.ts", | ||
}, | ||
"gitHead": "acf0846da3c14432c874673f19b1205428808f39" | ||
"gitHead": "f651775db1640f481b0c39e73f04688a6f819cc9" | ||
} |
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
56798
391