ato-water-lib 0.0.137 → 0.0.138
Sign up to get free protection for your applications and to get access to all the features.
@@ -7051,39 +7051,41 @@ class AtoDefaultGojsEditor {
|
|
7051
7051
|
: null;
|
7052
7052
|
}
|
7053
7053
|
},
|
7054
|
-
selectionAdornmentTemplate: this
|
7055
|
-
|
7056
|
-
|
7057
|
-
|
7058
|
-
|
7059
|
-
|
7060
|
-
|
7061
|
-
|
7062
|
-
|
7063
|
-
|
7064
|
-
|
7065
|
-
|
7066
|
-
|
7067
|
-
|
7068
|
-
|
7069
|
-
|
7070
|
-
|
7071
|
-
|
7072
|
-
|
7073
|
-
|
7074
|
-
|
7075
|
-
|
7076
|
-
|
7077
|
-
|
7078
|
-
|
7079
|
-
|
7080
|
-
|
7081
|
-
|
7082
|
-
|
7083
|
-
|
7084
|
-
|
7085
|
-
|
7086
|
-
|
7054
|
+
selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
|
7055
|
+
? null
|
7056
|
+
: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto',
|
7057
|
+
// { height: 62 },
|
7058
|
+
this.$(go.Shape, {
|
7059
|
+
fill: null,
|
7060
|
+
stroke: 'dodgerblue',
|
7061
|
+
strokeWidth: 4,
|
7062
|
+
}), this.$(go.Placeholder,
|
7063
|
+
// { padding: new go.Margin(8, 3, 0, 3) },
|
7064
|
+
new go.Binding('padding', '', (x) => {
|
7065
|
+
return (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell)
|
7066
|
+
? (x === null || x === void 0 ? void 0 : x.flowOfPlantCell) === ATO_ENUM_FLOW_DIRECTION.INFLOW
|
7067
|
+
? new go.Margin(0, 0, 0, 20)
|
7068
|
+
: new go.Margin(0, 20, 0, 0)
|
7069
|
+
: null;
|
7070
|
+
})), new go.Binding('height', '', (x) => {
|
7071
|
+
// const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
|
7072
|
+
const height = (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell) ? (x === null || x === void 0 ? void 0 : x.height) + 10 : null;
|
7073
|
+
if ((x === null || x === void 0 ? void 0 : x.group_visible) || (x === null || x === void 0 ? void 0 : x.isSelectBox)) {
|
7074
|
+
return (height !== null && height !== void 0 ? height : 0) + 44;
|
7075
|
+
}
|
7076
|
+
return height;
|
7077
|
+
}), new go.Binding('width', '', (x) => {
|
7078
|
+
return (x === null || x === void 0 ? void 0 : x.isTypeInflowOfPlantCell) ? (x === null || x === void 0 ? void 0 : x.width) + 12 : null;
|
7079
|
+
})), this.$(go.Panel, 'Horizontal', { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
|
7080
|
+
// more
|
7081
|
+
!this._initialOptions.isReadOnly
|
7082
|
+
? this.generateActionGroup([
|
7083
|
+
AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
|
7084
|
+
AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT,
|
7085
|
+
AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
|
7086
|
+
AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
|
7087
|
+
])
|
7088
|
+
: {})),
|
7087
7089
|
}, new go.Binding('visible', 'visible'), new go.Binding('fromSpot', 'fromSpot'), new go.Binding('toSpot', 'toSpot'), new go.Binding('movable', 'movable'), new go.Binding('selectable', 'selectable'), new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify), new go.Binding('deletable', 'deletable'),
|
7088
7090
|
// new go.Binding('alignment', 'alignment', function(loc) {
|
7089
7091
|
// return new go.Spot(0, 0, loc.x, 0);
|
@@ -7359,14 +7361,19 @@ class AtoDefaultGojsEditor {
|
|
7359
7361
|
},
|
7360
7362
|
click: (e, obj) => {
|
7361
7363
|
var _a, _b, _c, _d;
|
7362
|
-
|
7363
|
-
(
|
7364
|
-
|
7365
|
-
|
7366
|
-
|
7367
|
-
|
7368
|
-
|
7369
|
-
|
7364
|
+
const outputPayload = {
|
7365
|
+
left: (_a = e === null || e === void 0 ? void 0 : e['Wr']) === null || _a === void 0 ? void 0 : _a.x,
|
7366
|
+
top: (_b = e === null || e === void 0 ? void 0 : e['Wr']) === null || _b === void 0 ? void 0 : _b.y,
|
7367
|
+
node: node,
|
7368
|
+
component: obj === null || obj === void 0 ? void 0 : obj.data,
|
7369
|
+
};
|
7370
|
+
if (this.isSelectBox) {
|
7371
|
+
self.onClickCompoent.emit(outputPayload);
|
7372
|
+
return;
|
7373
|
+
}
|
7374
|
+
if ((_c = obj === null || obj === void 0 ? void 0 : obj.data) === null || _c === void 0 ? void 0 : _c.onSelected) {
|
7375
|
+
(_d = obj === null || obj === void 0 ? void 0 : obj.data) === null || _d === void 0 ? void 0 : _d.onSelected(obj === null || obj === void 0 ? void 0 : obj.data);
|
7376
|
+
self.onClickCompoent.emit(outputPayload);
|
7370
7377
|
}
|
7371
7378
|
},
|
7372
7379
|
selectionChanged: (e) => {
|
@@ -7375,7 +7382,7 @@ class AtoDefaultGojsEditor {
|
|
7375
7382
|
(_b = e === null || e === void 0 ? void 0 : e.data) === null || _b === void 0 ? void 0 : _b.onSelected(null);
|
7376
7383
|
}
|
7377
7384
|
},
|
7378
|
-
selectionAdornmentTemplate: this._initialOptions.isReadOnly
|
7385
|
+
selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
|
7379
7386
|
? null
|
7380
7387
|
: this.$(go.Adornment, 'Spot', {
|
7381
7388
|
shadowVisible: true,
|
@@ -7396,8 +7403,7 @@ class AtoDefaultGojsEditor {
|
|
7396
7403
|
? this.generateActionGroup([
|
7397
7404
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.RO_WATER_TREATMENT].name,
|
7398
7405
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER].name,
|
7399
|
-
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER]
|
7400
|
-
.name,
|
7406
|
+
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER].name,
|
7401
7407
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS].name,
|
7402
7408
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS].name,
|
7403
7409
|
].includes(title)
|
@@ -7621,6 +7627,7 @@ class AtoDefaultGojsEditor {
|
|
7621
7627
|
},
|
7622
7628
|
click: (e, obj) => {
|
7623
7629
|
var _a, _b, _c, _d;
|
7630
|
+
console.log('TEST');
|
7624
7631
|
if ((_a = obj === null || obj === void 0 ? void 0 : obj.data) === null || _a === void 0 ? void 0 : _a.onSelected) {
|
7625
7632
|
(_b = obj === null || obj === void 0 ? void 0 : obj.data) === null || _b === void 0 ? void 0 : _b.onSelected(obj === null || obj === void 0 ? void 0 : obj.data);
|
7626
7633
|
self.onClickCompoent.emit({
|
@@ -7750,14 +7757,19 @@ class AtoDefaultGojsEditor {
|
|
7750
7757
|
},
|
7751
7758
|
click: (e, obj) => {
|
7752
7759
|
var _a, _b, _c, _d;
|
7753
|
-
|
7754
|
-
(
|
7755
|
-
|
7756
|
-
|
7757
|
-
|
7758
|
-
|
7759
|
-
|
7760
|
-
|
7760
|
+
const outputPayload = {
|
7761
|
+
left: (_a = e === null || e === void 0 ? void 0 : e['Wr']) === null || _a === void 0 ? void 0 : _a.x,
|
7762
|
+
top: (_b = e === null || e === void 0 ? void 0 : e['Wr']) === null || _b === void 0 ? void 0 : _b.y,
|
7763
|
+
node: node,
|
7764
|
+
component: obj === null || obj === void 0 ? void 0 : obj.data,
|
7765
|
+
};
|
7766
|
+
if (this.isSelectBox) {
|
7767
|
+
self.onClickCompoent.emit(outputPayload);
|
7768
|
+
return;
|
7769
|
+
}
|
7770
|
+
if ((_c = obj === null || obj === void 0 ? void 0 : obj.data) === null || _c === void 0 ? void 0 : _c.onSelected) {
|
7771
|
+
(_d = obj === null || obj === void 0 ? void 0 : obj.data) === null || _d === void 0 ? void 0 : _d.onSelected(obj === null || obj === void 0 ? void 0 : obj.data);
|
7772
|
+
self.onClickCompoent.emit(outputPayload);
|
7761
7773
|
}
|
7762
7774
|
},
|
7763
7775
|
selectionChanged: (e) => {
|
@@ -7766,7 +7778,7 @@ class AtoDefaultGojsEditor {
|
|
7766
7778
|
(_b = e === null || e === void 0 ? void 0 : e.data) === null || _b === void 0 ? void 0 : _b.onSelected(null);
|
7767
7779
|
}
|
7768
7780
|
},
|
7769
|
-
selectionAdornmentTemplate: this._initialOptions.isReadOnly
|
7781
|
+
selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
|
7770
7782
|
? null
|
7771
7783
|
: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
7772
7784
|
fill: null,
|
@@ -8256,7 +8268,7 @@ class AtoDefaultGojsEditor {
|
|
8256
8268
|
}
|
8257
8269
|
case 'T':
|
8258
8270
|
case 'L': {
|
8259
|
-
panel.background = '
|
8271
|
+
panel.background = '#54bbba';
|
8260
8272
|
break;
|
8261
8273
|
}
|
8262
8274
|
default: {
|
@@ -8293,14 +8305,16 @@ class AtoDefaultGojsEditor {
|
|
8293
8305
|
switch (name) {
|
8294
8306
|
case 'B':
|
8295
8307
|
case 'R': {
|
8296
|
-
if ((data === null || data === void 0 ? void 0 : data.
|
8308
|
+
if ((data === null || data === void 0 ? void 0 : data.type) !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
|
8309
|
+
(data === null || data === void 0 ? void 0 : data.systemType) === AtoGojsEditorModel.WaterDischargeDestinations) {
|
8297
8310
|
return false;
|
8298
8311
|
}
|
8299
8312
|
return !(data === null || data === void 0 ? void 0 : data.isNotSelectOutput);
|
8300
8313
|
}
|
8301
8314
|
case 'T':
|
8302
8315
|
case 'L': {
|
8303
|
-
if ((data === null || data === void 0 ? void 0 : data.
|
8316
|
+
if ((data === null || data === void 0 ? void 0 : data.type) !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
|
8317
|
+
(data === null || data === void 0 ? void 0 : data.systemType) === AtoGojsEditorModel.WaterWithdrawSources) {
|
8304
8318
|
return false;
|
8305
8319
|
}
|
8306
8320
|
return !(data === null || data === void 0 ? void 0 : data.isNotSelectInput);
|