ato-water-lib 0.0.139 → 0.0.141
Sign up to get free protection for your applications and to get access to all the features.
@@ -7026,7 +7026,7 @@ class AtoDefaultGojsEditor {
|
|
7026
7026
|
}
|
7027
7027
|
},
|
7028
7028
|
doubleClick: (e, obj) => {
|
7029
|
-
var _a, _b, _c, _d, _e;
|
7029
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
7030
7030
|
const node = obj.part;
|
7031
7031
|
if (((_a = node === null || node === void 0 ? void 0 : node.ob) === null || _a === void 0 ? void 0 : _a.isTypeInflowOfPlantCell) && !((_b = this._initialOptions) === null || _b === void 0 ? void 0 : _b.isReadOnly)) {
|
7032
7032
|
// obj?.data?.onSelected(node?.ob?.nodePlantCellParent);
|
@@ -7050,6 +7050,13 @@ class AtoDefaultGojsEditor {
|
|
7050
7050
|
})
|
7051
7051
|
: null;
|
7052
7052
|
}
|
7053
|
+
if (this.isSelectBox) {
|
7054
|
+
self.onClickInfoButton.emit({
|
7055
|
+
left: (_f = e === null || e === void 0 ? void 0 : e['Wr']) === null || _f === void 0 ? void 0 : _f.x,
|
7056
|
+
top: (_g = e === null || e === void 0 ? void 0 : e['Wr']) === null || _g === void 0 ? void 0 : _g.y,
|
7057
|
+
node: node,
|
7058
|
+
});
|
7059
|
+
}
|
7053
7060
|
},
|
7054
7061
|
selectionAdorned: false,
|
7055
7062
|
selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
|
@@ -7113,6 +7120,9 @@ class AtoDefaultGojsEditor {
|
|
7113
7120
|
margin: 2,
|
7114
7121
|
}, new go.Binding('text', '', function (data) {
|
7115
7122
|
var _a;
|
7123
|
+
if (self.isSelectBox) {
|
7124
|
+
return data === null || data === void 0 ? void 0 : data.name;
|
7125
|
+
}
|
7116
7126
|
if (!self._initialOptions.isReadOnly) {
|
7117
7127
|
return (_a = data === null || data === void 0 ? void 0 : data.name) !== null && _a !== void 0 ? _a : VALUE_NA;
|
7118
7128
|
}
|
@@ -7489,6 +7499,9 @@ class AtoDefaultGojsEditor {
|
|
7489
7499
|
toolTip: this.$('ToolTip', this.$(go.TextBlock, { margin: 4 }, new go.Binding('text', 'name'))),
|
7490
7500
|
}, new go.Binding('text', 'name').makeTwoWay(), new go.Binding('editable', '', (data) => {
|
7491
7501
|
var _a;
|
7502
|
+
if ((data === null || data === void 0 ? void 0 : data.editable) !== undefined) {
|
7503
|
+
return data === null || data === void 0 ? void 0 : data.editable;
|
7504
|
+
}
|
7492
7505
|
return !(((_a = AtoGojsEditorModel.TYPE_COMPONENT_WATER) === null || _a === void 0 ? void 0 : _a.includes(data === null || data === void 0 ? void 0 : data.systemType)) &&
|
7493
7506
|
(data === null || data === void 0 ? void 0 : data.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER &&
|
7494
7507
|
(data === null || data === void 0 ? void 0 : data.topologyType) !== ATO_ECOMPONENT_PLANT_TYPE.WATER_PLANT_CELL);
|
@@ -7498,37 +7511,19 @@ class AtoDefaultGojsEditor {
|
|
7498
7511
|
source: ICONS_BASE64['uf14a'],
|
7499
7512
|
height: 14,
|
7500
7513
|
width: 14,
|
7501
|
-
}, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; })), this.$(go.
|
7502
|
-
alignment: go.Spot.TopLeft,
|
7503
|
-
margin: new go.Margin(2, 0, 0, 2),
|
7504
|
-
stroke: '#DC8FA9',
|
7505
|
-
font: 'bold 9pt Arial',
|
7506
|
-
textAlign: 'left',
|
7507
|
-
}, new go.Binding('text', '', (x) => x === null || x === void 0 ? void 0 : x.group_text), new go.Binding('stroke', '', (x) => x === null || x === void 0 ? void 0 : x.group_text_stroke)))),
|
7508
|
-
// Select box
|
7509
|
-
// this.$(
|
7510
|
-
// go.Panel,
|
7511
|
-
// 'Auto',
|
7512
|
-
// {
|
7513
|
-
// alignment: go.Spot.TopRight,
|
7514
|
-
// alignmentFocus: go.Spot.TopRight,
|
7515
|
-
// },
|
7516
|
-
// // new go.Binding('visible', '', (x) => x?.isSelectBox ?? false),
|
7517
|
-
// this.$(go.Picture, {
|
7518
|
-
// alignment: go.Spot.Right,
|
7519
|
-
// margin: new go.Margin(2, 0, 0, 0),
|
7520
|
-
// source: ICONS_BASE64['uf14a'],
|
7521
|
-
// height: 17,
|
7522
|
-
// width: 14,
|
7523
|
-
// }),
|
7524
|
-
// ),
|
7525
|
-
this.$(go.Panel, 'Vertical', {
|
7514
|
+
}, new go.Binding('visible', '', (x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.isSelectBox) !== null && _a !== void 0 ? _a : false; })), this.$(go.Panel, 'Vertical', {
|
7526
7515
|
alignment: go.Spot.Left,
|
7527
7516
|
alignmentFocus: new go.Spot(0, 0.5, 8, 0),
|
7528
7517
|
}), this.$(go.Panel, 'Vertical', {
|
7529
7518
|
alignment: go.Spot.Right,
|
7530
7519
|
alignmentFocus: new go.Spot(1, 0.5, -8, 0),
|
7531
|
-
}), this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true), this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true), this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false), this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false)
|
7520
|
+
}), this.makePort('T', go.Spot.Top, go.Spot.TopSide, false, true), this.makePort('L', go.Spot.Left, go.Spot.LeftSide, false, true), this.makePort('R', go.Spot.Right, go.Spot.RightSide, true, false), this.makePort('B', go.Spot.Bottom, go.Spot.BottomSide, true, false), this.$(go.TextBlock, '', {
|
7521
|
+
alignment: go.Spot.TopLeft,
|
7522
|
+
margin: new go.Margin(2, 0, 0, 2),
|
7523
|
+
stroke: '#DC8FA9',
|
7524
|
+
font: 'bold 9pt Arial',
|
7525
|
+
textAlign: 'left',
|
7526
|
+
}, new go.Binding('text', '', (x) => x === null || x === void 0 ? void 0 : x.group_text), new go.Binding('stroke', '', (x) => x === null || x === void 0 ? void 0 : x.group_text_stroke)))));
|
7532
7527
|
this.myDiagram.nodeTemplateMap.set(title, node);
|
7533
7528
|
}
|
7534
7529
|
makeEntityTemplateEnergy(icon, title, size = {
|
@@ -7893,7 +7888,7 @@ class AtoDefaultGojsEditor {
|
|
7893
7888
|
toolTip: this.$('ToolTip', this.$(go.TextBlock, {
|
7894
7889
|
margin: 4,
|
7895
7890
|
}, new go.Binding('text', 'name').makeTwoWay())),
|
7896
|
-
}, new go.Binding('text', 'name').makeTwoWay())),
|
7891
|
+
}, new go.Binding('text', 'name').makeTwoWay(), new go.Binding('editable', 'editable'))),
|
7897
7892
|
// this.$('CheckBox', '', {
|
7898
7893
|
// alignment: go.Spot.TopLeft,
|
7899
7894
|
// margin: new go.Margin(2, 0, 0, 2),
|
@@ -8205,8 +8200,14 @@ class AtoDefaultGojsEditor {
|
|
8205
8200
|
this.myDiagram.commitTransaction('add group node');
|
8206
8201
|
}
|
8207
8202
|
deleteNode(e) {
|
8203
|
+
// e.diagram.startTransaction('Delete group node');
|
8204
|
+
// e.diagram.removeParts(e.diagram.selection);
|
8205
|
+
// e.diagram.commitTransaction('Delete group node');
|
8208
8206
|
e.diagram.startTransaction('Delete group node');
|
8209
|
-
e.diagram.
|
8207
|
+
const deletableParts = e.diagram.selection.filter((part) => {
|
8208
|
+
return part.data.deletable !== false;
|
8209
|
+
});
|
8210
|
+
e.diagram.removeParts(deletableParts);
|
8210
8211
|
e.diagram.commitTransaction('Delete group node');
|
8211
8212
|
}
|
8212
8213
|
deleteNodeOnDiagram(e) {
|