@limble/limble-tree 1.0.0-beta.3 → 1.0.0
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/README.md +1 -5
- package/esm2020/lib/core/tree-branch/tree-branch.mjs +10 -6
- package/fesm2015/limble-limble-tree.mjs +9 -5
- package/fesm2015/limble-limble-tree.mjs.map +1 -1
- package/fesm2020/limble-limble-tree.mjs +9 -5
- package/fesm2020/limble-limble-tree.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -862,7 +862,6 @@ class TreeBranch {
|
|
|
862
862
|
assert(parentBranchesContainer !== undefined);
|
|
863
863
|
this.branchController = new BranchController(this, parentBranchesContainer);
|
|
864
864
|
const hostView = this.branchController.getHostView();
|
|
865
|
-
this.setIndentation(parent);
|
|
866
865
|
if (parent instanceof TreeBranch &&
|
|
867
866
|
parent.branchOptions.defaultCollapsed === true) {
|
|
868
867
|
treeCollapser.storePrecollapsedNode(parent, this);
|
|
@@ -876,8 +875,9 @@ class TreeBranch {
|
|
|
876
875
|
child: this,
|
|
877
876
|
index: this._parent.branches().length
|
|
878
877
|
}));
|
|
879
|
-
this.
|
|
878
|
+
this.setIndentation();
|
|
880
879
|
}
|
|
880
|
+
this.detectChanges();
|
|
881
881
|
}
|
|
882
882
|
/** @returns All child branches as an array of TreeBranch instances, in order. */
|
|
883
883
|
branches() {
|
|
@@ -1246,10 +1246,14 @@ class TreeBranch {
|
|
|
1246
1246
|
this.detachedView.reattach();
|
|
1247
1247
|
container.insert(this.detachedView, index);
|
|
1248
1248
|
this.detachedView = null;
|
|
1249
|
+
this.setIndentation();
|
|
1249
1250
|
}
|
|
1250
|
-
setIndentation(
|
|
1251
|
-
|
|
1252
|
-
|
|
1251
|
+
setIndentation() {
|
|
1252
|
+
assert(this._parent !== undefined);
|
|
1253
|
+
const root = this._parent.root();
|
|
1254
|
+
if (root === undefined) {
|
|
1255
|
+
return;
|
|
1256
|
+
}
|
|
1253
1257
|
const options = config.getConfig(root);
|
|
1254
1258
|
const branchesContainerEl = this.branchController
|
|
1255
1259
|
.getNativeElement()
|