@wcardinal/wcardinal-ui 0.376.3 → 0.377.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/dist/types/wcardinal/ui/shape/index.d.ts +0 -2
- package/dist/wcardinal/ui/shape/index.js +0 -2
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +1 -326
- package/dist/wcardinal-ui.js +1 -326
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-deleter.d.ts +0 -7
- package/dist/types/wcardinal/ui/shape/e-shape-search.d.ts +0 -71
- package/dist/wcardinal/ui/shape/e-shape-deleter.js +0 -124
- package/dist/wcardinal/ui/shape/e-shape-deleter.js.map +0 -1
- package/dist/wcardinal/ui/shape/e-shape-search.js +0 -203
- package/dist/wcardinal/ui/shape/e-shape-search.js.map +0 -1
|
@@ -55,7 +55,6 @@ export * from "./e-shape-data-value-type";
|
|
|
55
55
|
export * from "./e-shape-data-value";
|
|
56
56
|
export * from "./e-shape-data";
|
|
57
57
|
export * from "./e-shape-defaults";
|
|
58
|
-
export * from "./e-shape-deleter";
|
|
59
58
|
export * from "./e-shape-deserializers";
|
|
60
59
|
export * from "./e-shape-editor";
|
|
61
60
|
export * from "./e-shape-fill";
|
|
@@ -90,7 +89,6 @@ export * from "./e-shape-runtime-impl";
|
|
|
90
89
|
export * from "./e-shape-runtime-reset";
|
|
91
90
|
export * from "./e-shape-runtime";
|
|
92
91
|
export * from "./e-shape-runtimes";
|
|
93
|
-
export * from "./e-shape-search";
|
|
94
92
|
export * from "./e-shape-state-set-impl-observable";
|
|
95
93
|
export * from "./e-shape-state-set";
|
|
96
94
|
export * from "./e-shape-state";
|
|
@@ -59,7 +59,6 @@ export * from "./e-shape-data-value-type";
|
|
|
59
59
|
export * from "./e-shape-data-value";
|
|
60
60
|
export * from "./e-shape-data";
|
|
61
61
|
export * from "./e-shape-defaults";
|
|
62
|
-
export * from "./e-shape-deleter";
|
|
63
62
|
export * from "./e-shape-deserializers";
|
|
64
63
|
export * from "./e-shape-editor";
|
|
65
64
|
export * from "./e-shape-fill";
|
|
@@ -94,7 +93,6 @@ export * from "./e-shape-runtime-impl";
|
|
|
94
93
|
export * from "./e-shape-runtime-reset";
|
|
95
94
|
export * from "./e-shape-runtime";
|
|
96
95
|
export * from "./e-shape-runtimes";
|
|
97
|
-
export * from "./e-shape-search";
|
|
98
96
|
export * from "./e-shape-state-set-impl-observable";
|
|
99
97
|
export * from "./e-shape-state-set";
|
|
100
98
|
export * from "./e-shape-state";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+B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,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-edge-normal\";\nexport * from \"./e-shape-acceptor-edge-side\";\nexport * from \"./e-shape-acceptor-edge-size\";\nexport * from \"./e-shape-acceptor-edge-type\";\nexport * from \"./e-shape-acceptor-edge\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability-container-impl\";\nexport * from \"./e-shape-capability-container\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-bodies\";\nexport * from \"./e-shape-connector-body-impl\";\nexport * from \"./e-shape-connector-body\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-impl\";\nexport * from \"./e-shape-data-mapper-impl\";\nexport * from \"./e-shape-data-mapper\";\nexport * from \"./e-shape-data-mapping-impl\";\nexport * from \"./e-shape-data-mapping\";\nexport * from \"./e-shape-data-scoped-impl\";\nexport * from \"./e-shape-data-scoped\";\nexport * from \"./e-shape-data-system-impl\";\nexport * from \"./e-shape-data-system\";\nexport * from \"./e-shape-data-value-extension\";\nexport * from \"./e-shape-data-value-extensions\";\nexport * from \"./e-shape-data-value-formatter\";\nexport * from \"./e-shape-data-value-impl\";\nexport * from \"./e-shape-data-value-order\";\nexport * from \"./e-shape-data-value-range-impl\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value-scope\";\nexport * from \"./e-shape-data-value-state\";\nexport * from \"./e-shape-data-value-type\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-formatters\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization-mode\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime-impl\";\nexport * from \"./e-shape-runtime-reset\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.377.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -45640,329 +45640,6 @@ var EShapeDataValueExtensions = /** @class */ (function () {
|
|
|
45640
45640
|
return EShapeDataValueExtensions;
|
|
45641
45641
|
}());
|
|
45642
45642
|
|
|
45643
|
-
/*
|
|
45644
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
45645
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45646
|
-
*/
|
|
45647
|
-
/**
|
|
45648
|
-
* {@link EShape} search utility.
|
|
45649
|
-
*/
|
|
45650
|
-
var EShapeSearch = /** @class */ (function () {
|
|
45651
|
-
function EShapeSearch() {
|
|
45652
|
-
}
|
|
45653
|
-
/**
|
|
45654
|
-
* Returns indices of the given shapes.
|
|
45655
|
-
*
|
|
45656
|
-
* @param shapes shapes
|
|
45657
|
-
* @return indices
|
|
45658
|
-
*/
|
|
45659
|
-
EShapeSearch.toIndices = function (shapes) {
|
|
45660
|
-
var result = [];
|
|
45661
|
-
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
45662
|
-
result.push(shapes[i].index);
|
|
45663
|
-
}
|
|
45664
|
-
return result;
|
|
45665
|
-
};
|
|
45666
|
-
/**
|
|
45667
|
-
* Returns a depth of the given shape.
|
|
45668
|
-
*
|
|
45669
|
-
* @param shape a shape
|
|
45670
|
-
* @return a depth
|
|
45671
|
-
*/
|
|
45672
|
-
EShapeSearch.toDepth = function (shape) {
|
|
45673
|
-
var result = 0;
|
|
45674
|
-
var parent = shape.parent;
|
|
45675
|
-
while (parent instanceof EShapeBase) {
|
|
45676
|
-
result += 1;
|
|
45677
|
-
parent = parent.parent;
|
|
45678
|
-
}
|
|
45679
|
-
return result;
|
|
45680
|
-
};
|
|
45681
|
-
/**
|
|
45682
|
-
* Returns a deepest shape on the path to the given shapes.
|
|
45683
|
-
*
|
|
45684
|
-
* @param shapeA a shape
|
|
45685
|
-
* @param shapeB a shape
|
|
45686
|
-
* @return a found shape
|
|
45687
|
-
*/
|
|
45688
|
-
EShapeSearch.toSharedParent = function (shapeA, shapeB) {
|
|
45689
|
-
var depthA = this.toDepth(shapeA);
|
|
45690
|
-
var depthB = this.toDepth(shapeB);
|
|
45691
|
-
if (depthA < depthB) {
|
|
45692
|
-
var parent_1 = shapeA.parent;
|
|
45693
|
-
while (parent_1 instanceof EShapeBase) {
|
|
45694
|
-
if (this.isParent(shapeB, parent_1)) {
|
|
45695
|
-
return parent_1;
|
|
45696
|
-
}
|
|
45697
|
-
parent_1 = parent_1.parent;
|
|
45698
|
-
}
|
|
45699
|
-
return parent_1;
|
|
45700
|
-
}
|
|
45701
|
-
else {
|
|
45702
|
-
var parent_2 = shapeB.parent;
|
|
45703
|
-
while (parent_2 instanceof EShapeBase) {
|
|
45704
|
-
if (this.isParent(shapeA, parent_2)) {
|
|
45705
|
-
return parent_2;
|
|
45706
|
-
}
|
|
45707
|
-
parent_2 = parent_2.parent;
|
|
45708
|
-
}
|
|
45709
|
-
return parent_2;
|
|
45710
|
-
}
|
|
45711
|
-
};
|
|
45712
|
-
/**
|
|
45713
|
-
* Returns a shape on the path to the given shape whose parent is equals to the given parent.
|
|
45714
|
-
* If there is no such shape, returns a root shape on the path.
|
|
45715
|
-
*
|
|
45716
|
-
* @param shape a shape
|
|
45717
|
-
* @param parent a parent
|
|
45718
|
-
* @returns a found shape
|
|
45719
|
-
*/
|
|
45720
|
-
EShapeSearch.toOfParent = function (shape, parent) {
|
|
45721
|
-
var shapeParent = shape.parent;
|
|
45722
|
-
while (shapeParent !== parent && shapeParent instanceof EShapeBase) {
|
|
45723
|
-
shape = shapeParent;
|
|
45724
|
-
shapeParent = shapeParent.parent;
|
|
45725
|
-
}
|
|
45726
|
-
return shape;
|
|
45727
|
-
};
|
|
45728
|
-
/**
|
|
45729
|
-
* Returns true if the given target is on the path to the given shape.
|
|
45730
|
-
*
|
|
45731
|
-
* @param shape a shape
|
|
45732
|
-
* @param target a check target
|
|
45733
|
-
* @return true if the given target is on the path to the given shape
|
|
45734
|
-
*/
|
|
45735
|
-
EShapeSearch.isParent = function (shape, target) {
|
|
45736
|
-
var parent = shape.parent;
|
|
45737
|
-
while (parent instanceof EShapeBase) {
|
|
45738
|
-
if (parent === target) {
|
|
45739
|
-
return true;
|
|
45740
|
-
}
|
|
45741
|
-
parent = parent.parent;
|
|
45742
|
-
}
|
|
45743
|
-
return false;
|
|
45744
|
-
};
|
|
45745
|
-
/**
|
|
45746
|
-
* Returns a selected shape on the path to the given shape.
|
|
45747
|
-
* If there are more than one selected shapes, returns a deepest selected shape.
|
|
45748
|
-
*
|
|
45749
|
-
* @param shape a shape
|
|
45750
|
-
* @return a found selected shape or null
|
|
45751
|
-
*/
|
|
45752
|
-
EShapeSearch.toSelected = function (shape) {
|
|
45753
|
-
var target = shape;
|
|
45754
|
-
while (target instanceof EShapeBase) {
|
|
45755
|
-
if (target.selected) {
|
|
45756
|
-
return target;
|
|
45757
|
-
}
|
|
45758
|
-
target = target.parent;
|
|
45759
|
-
}
|
|
45760
|
-
return null;
|
|
45761
|
-
};
|
|
45762
|
-
EShapeSearch.findChildById = function (shape, id, recursively) {
|
|
45763
|
-
var children = shape.children;
|
|
45764
|
-
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
45765
|
-
var child = children[i];
|
|
45766
|
-
if (child.id === id) {
|
|
45767
|
-
return child;
|
|
45768
|
-
}
|
|
45769
|
-
if (recursively === true) {
|
|
45770
|
-
var result = EShapeSearch.findChildById(child, id, recursively);
|
|
45771
|
-
if (result != null) {
|
|
45772
|
-
return result;
|
|
45773
|
-
}
|
|
45774
|
-
}
|
|
45775
|
-
}
|
|
45776
|
-
return null;
|
|
45777
|
-
};
|
|
45778
|
-
EShapeSearch.findChildByType = function (shape, type, recursively) {
|
|
45779
|
-
var children = shape.children;
|
|
45780
|
-
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
45781
|
-
var child = children[i];
|
|
45782
|
-
if (child.type === type) {
|
|
45783
|
-
return child;
|
|
45784
|
-
}
|
|
45785
|
-
if (recursively === true) {
|
|
45786
|
-
var result = EShapeSearch.findChildByType(child, type, recursively);
|
|
45787
|
-
if (result != null) {
|
|
45788
|
-
return result;
|
|
45789
|
-
}
|
|
45790
|
-
}
|
|
45791
|
-
}
|
|
45792
|
-
return null;
|
|
45793
|
-
};
|
|
45794
|
-
EShapeSearch.findChild = function (shape, matcher, recursively) {
|
|
45795
|
-
var children = shape.children;
|
|
45796
|
-
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
45797
|
-
var child = children[i];
|
|
45798
|
-
if (matcher(child)) {
|
|
45799
|
-
return child;
|
|
45800
|
-
}
|
|
45801
|
-
if (recursively === true) {
|
|
45802
|
-
var result = EShapeSearch.findChild(child, matcher, recursively);
|
|
45803
|
-
if (result != null) {
|
|
45804
|
-
return result;
|
|
45805
|
-
}
|
|
45806
|
-
}
|
|
45807
|
-
}
|
|
45808
|
-
return null;
|
|
45809
|
-
};
|
|
45810
|
-
EShapeSearch.findChildrenByType = function (shape, type, recursively, result) {
|
|
45811
|
-
result = result || [];
|
|
45812
|
-
var children = shape.children;
|
|
45813
|
-
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
45814
|
-
var child = children[i];
|
|
45815
|
-
if (child.type === type) {
|
|
45816
|
-
result.push(child);
|
|
45817
|
-
}
|
|
45818
|
-
if (recursively === true) {
|
|
45819
|
-
EShapeSearch.findChildrenByType(child, type, recursively, result);
|
|
45820
|
-
}
|
|
45821
|
-
}
|
|
45822
|
-
return result;
|
|
45823
|
-
};
|
|
45824
|
-
EShapeSearch.findChildren = function (shape, matcher, recursively, result) {
|
|
45825
|
-
result = result || [];
|
|
45826
|
-
var children = shape.children;
|
|
45827
|
-
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
45828
|
-
var child = children[i];
|
|
45829
|
-
if (matcher(child)) {
|
|
45830
|
-
result.push(child);
|
|
45831
|
-
}
|
|
45832
|
-
if (recursively === true) {
|
|
45833
|
-
EShapeSearch.findChildren(child, matcher, recursively, result);
|
|
45834
|
-
}
|
|
45835
|
-
}
|
|
45836
|
-
return result;
|
|
45837
|
-
};
|
|
45838
|
-
EShapeSearch.COMPARATOR_INDEX = function (a, b) {
|
|
45839
|
-
return a.index - b.index;
|
|
45840
|
-
};
|
|
45841
|
-
return EShapeSearch;
|
|
45842
|
-
}());
|
|
45843
|
-
|
|
45844
|
-
/*
|
|
45845
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
45846
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
45847
|
-
*/
|
|
45848
|
-
var EShapeDeleter = /** @class */ (function () {
|
|
45849
|
-
function EShapeDeleter() {
|
|
45850
|
-
}
|
|
45851
|
-
EShapeDeleter.addAll = function (shapes, result) {
|
|
45852
|
-
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
45853
|
-
var shape = shapes[i];
|
|
45854
|
-
result.add(shape);
|
|
45855
|
-
this.addAll(shape.children, result);
|
|
45856
|
-
}
|
|
45857
|
-
return result;
|
|
45858
|
-
};
|
|
45859
|
-
EShapeDeleter.delete = function (parent, shapes, generateListOfDetachedShapes) {
|
|
45860
|
-
var _a;
|
|
45861
|
-
var children = parent.children;
|
|
45862
|
-
var length = children.length;
|
|
45863
|
-
// Update indices
|
|
45864
|
-
var exceptions = ((_a = EShapeDeleter.EXCEPTIONS) !== null && _a !== void 0 ? _a : (EShapeDeleter.EXCEPTIONS = new Set()));
|
|
45865
|
-
for (var i = 0; i < length; ++i) {
|
|
45866
|
-
var child = children[i];
|
|
45867
|
-
if (child.selected) {
|
|
45868
|
-
child.index = length + i;
|
|
45869
|
-
exceptions.add(child);
|
|
45870
|
-
this.addAll(child.children, exceptions);
|
|
45871
|
-
}
|
|
45872
|
-
else {
|
|
45873
|
-
child.index = i;
|
|
45874
|
-
}
|
|
45875
|
-
}
|
|
45876
|
-
// Sort
|
|
45877
|
-
children.sort(EShapeSearch.COMPARATOR_INDEX);
|
|
45878
|
-
// Detach
|
|
45879
|
-
if (generateListOfDetachedShapes === true) {
|
|
45880
|
-
for (var i = length - 1; 0 <= i; --i) {
|
|
45881
|
-
var child = children[i];
|
|
45882
|
-
if (child.selected) {
|
|
45883
|
-
child.index -= length;
|
|
45884
|
-
child.parent = null;
|
|
45885
|
-
child.selected = false;
|
|
45886
|
-
child.uploaded = undefined;
|
|
45887
|
-
child.onDetach(exceptions);
|
|
45888
|
-
}
|
|
45889
|
-
else {
|
|
45890
|
-
exceptions.clear();
|
|
45891
|
-
var size = children.length - (i + 1);
|
|
45892
|
-
if (0 < size) {
|
|
45893
|
-
var result = children.splice(i + 1, size);
|
|
45894
|
-
if (shapes != null) {
|
|
45895
|
-
shapes.length = 0;
|
|
45896
|
-
}
|
|
45897
|
-
parent.onChildTransformChange();
|
|
45898
|
-
parent.toDirty();
|
|
45899
|
-
return result;
|
|
45900
|
-
}
|
|
45901
|
-
else {
|
|
45902
|
-
if (shapes != null) {
|
|
45903
|
-
shapes.length = 0;
|
|
45904
|
-
}
|
|
45905
|
-
return null;
|
|
45906
|
-
}
|
|
45907
|
-
}
|
|
45908
|
-
}
|
|
45909
|
-
exceptions.clear();
|
|
45910
|
-
if (0 < children.length) {
|
|
45911
|
-
var result = children.splice(0, children.length);
|
|
45912
|
-
if (shapes != null) {
|
|
45913
|
-
shapes.length = 0;
|
|
45914
|
-
}
|
|
45915
|
-
parent.onChildTransformChange();
|
|
45916
|
-
parent.toDirty();
|
|
45917
|
-
return result;
|
|
45918
|
-
}
|
|
45919
|
-
else {
|
|
45920
|
-
if (shapes != null) {
|
|
45921
|
-
shapes.length = 0;
|
|
45922
|
-
}
|
|
45923
|
-
return null;
|
|
45924
|
-
}
|
|
45925
|
-
}
|
|
45926
|
-
else {
|
|
45927
|
-
for (var i = length - 1; 0 <= i; --i) {
|
|
45928
|
-
var child = children[i];
|
|
45929
|
-
if (child.selected) {
|
|
45930
|
-
child.parent = null;
|
|
45931
|
-
child.selected = false;
|
|
45932
|
-
child.uploaded = undefined;
|
|
45933
|
-
child.onDetach(exceptions);
|
|
45934
|
-
}
|
|
45935
|
-
else {
|
|
45936
|
-
exceptions.clear();
|
|
45937
|
-
children.length = i + 1;
|
|
45938
|
-
if (shapes != null) {
|
|
45939
|
-
shapes.length = 0;
|
|
45940
|
-
}
|
|
45941
|
-
parent.onChildTransformChange();
|
|
45942
|
-
parent.toDirty();
|
|
45943
|
-
return null;
|
|
45944
|
-
}
|
|
45945
|
-
}
|
|
45946
|
-
exceptions.clear();
|
|
45947
|
-
if (0 < children.length) {
|
|
45948
|
-
children.length = 0;
|
|
45949
|
-
if (shapes != null) {
|
|
45950
|
-
shapes.length = 0;
|
|
45951
|
-
}
|
|
45952
|
-
parent.onChildTransformChange();
|
|
45953
|
-
parent.toDirty();
|
|
45954
|
-
}
|
|
45955
|
-
else {
|
|
45956
|
-
if (shapes != null) {
|
|
45957
|
-
shapes.length = 0;
|
|
45958
|
-
}
|
|
45959
|
-
}
|
|
45960
|
-
return null;
|
|
45961
|
-
}
|
|
45962
|
-
};
|
|
45963
|
-
return EShapeDeleter;
|
|
45964
|
-
}());
|
|
45965
|
-
|
|
45966
45643
|
/*
|
|
45967
45644
|
* Copyright (C) 2019 Toshiba Corporation
|
|
45968
45645
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -95680,7 +95357,6 @@ exports.EShapeDataValueScope = EShapeDataValueScope;
|
|
|
95680
95357
|
exports.EShapeDataValueState = EShapeDataValueState;
|
|
95681
95358
|
exports.EShapeDataValueType = EShapeDataValueType;
|
|
95682
95359
|
exports.EShapeDefaults = EShapeDefaults;
|
|
95683
|
-
exports.EShapeDeleter = EShapeDeleter;
|
|
95684
95360
|
exports.EShapeDeserializers = EShapeDeserializers;
|
|
95685
95361
|
exports.EShapeEditor = EShapeEditor;
|
|
95686
95362
|
exports.EShapeEmbedded = EShapeEmbedded;
|
|
@@ -95747,7 +95423,6 @@ exports.EShapeResourceManagerSerialization = EShapeResourceManagerSerialization;
|
|
|
95747
95423
|
exports.EShapeRuntimeImpl = EShapeRuntimeImpl;
|
|
95748
95424
|
exports.EShapeRuntimeReset = EShapeRuntimeReset;
|
|
95749
95425
|
exports.EShapeRuntimes = EShapeRuntimes;
|
|
95750
|
-
exports.EShapeSearch = EShapeSearch;
|
|
95751
95426
|
exports.EShapeSemicircle = EShapeSemicircle;
|
|
95752
95427
|
exports.EShapeState = EShapeState;
|
|
95753
95428
|
exports.EShapeStateSetImplObservable = EShapeStateSetImplObservable;
|