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.
@@ -8206,39 +8206,41 @@ class AtoDefaultGojsEditor {
|
|
8206
8206
|
: null;
|
8207
8207
|
}
|
8208
8208
|
},
|
8209
|
-
selectionAdornmentTemplate: this
|
8210
|
-
|
8211
|
-
|
8212
|
-
|
8213
|
-
|
8214
|
-
|
8215
|
-
|
8216
|
-
|
8217
|
-
|
8218
|
-
|
8219
|
-
|
8220
|
-
|
8221
|
-
|
8222
|
-
|
8223
|
-
|
8224
|
-
|
8225
|
-
|
8226
|
-
|
8227
|
-
|
8228
|
-
|
8229
|
-
|
8230
|
-
|
8231
|
-
|
8232
|
-
|
8233
|
-
|
8234
|
-
|
8235
|
-
|
8236
|
-
|
8237
|
-
|
8238
|
-
|
8239
|
-
|
8240
|
-
|
8241
|
-
|
8209
|
+
selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
|
8210
|
+
? null
|
8211
|
+
: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto',
|
8212
|
+
// { height: 62 },
|
8213
|
+
this.$(go.Shape, {
|
8214
|
+
fill: null,
|
8215
|
+
stroke: 'dodgerblue',
|
8216
|
+
strokeWidth: 4,
|
8217
|
+
}), this.$(go.Placeholder,
|
8218
|
+
// { padding: new go.Margin(8, 3, 0, 3) },
|
8219
|
+
new go.Binding('padding', '', (x) => {
|
8220
|
+
return x?.isTypeInflowOfPlantCell
|
8221
|
+
? x?.flowOfPlantCell === ATO_ENUM_FLOW_DIRECTION.INFLOW
|
8222
|
+
? new go.Margin(0, 0, 0, 20)
|
8223
|
+
: new go.Margin(0, 20, 0, 0)
|
8224
|
+
: null;
|
8225
|
+
})), new go.Binding('height', '', (x) => {
|
8226
|
+
// const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
|
8227
|
+
const height = x?.isTypeInflowOfPlantCell ? x?.height + 10 : null;
|
8228
|
+
if (x?.group_visible || x?.isSelectBox) {
|
8229
|
+
return (height ?? 0) + 44;
|
8230
|
+
}
|
8231
|
+
return height;
|
8232
|
+
}), new go.Binding('width', '', (x) => {
|
8233
|
+
return x?.isTypeInflowOfPlantCell ? x?.width + 12 : null;
|
8234
|
+
})), this.$(go.Panel, 'Horizontal', { alignment: go.Spot.TopRight, alignmentFocus: go.Spot.Bottom },
|
8235
|
+
// more
|
8236
|
+
!this._initialOptions.isReadOnly
|
8237
|
+
? this.generateActionGroup([
|
8238
|
+
AtoDefaultGojsEditor.ENUM_ACTIONS.RENAME,
|
8239
|
+
AtoDefaultGojsEditor.ENUM_ACTIONS.INSIGHT,
|
8240
|
+
AtoDefaultGojsEditor.ENUM_ACTIONS.OUTFLOW,
|
8241
|
+
AtoDefaultGojsEditor.ENUM_ACTIONS.DELETE,
|
8242
|
+
])
|
8243
|
+
: {})),
|
8242
8244
|
}, 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'),
|
8243
8245
|
// new go.Binding('alignment', 'alignment', function(loc) {
|
8244
8246
|
// return new go.Spot(0, 0, loc.x, 0);
|
@@ -8507,14 +8509,19 @@ class AtoDefaultGojsEditor {
|
|
8507
8509
|
// self.showPoint(obj?.part?.location);
|
8508
8510
|
},
|
8509
8511
|
click: (e, obj) => {
|
8512
|
+
const outputPayload = {
|
8513
|
+
left: e?.['Wr']?.x,
|
8514
|
+
top: e?.['Wr']?.y,
|
8515
|
+
node: node,
|
8516
|
+
component: obj?.data,
|
8517
|
+
};
|
8518
|
+
if (this.isSelectBox) {
|
8519
|
+
self.onClickCompoent.emit(outputPayload);
|
8520
|
+
return;
|
8521
|
+
}
|
8510
8522
|
if (obj?.data?.onSelected) {
|
8511
8523
|
obj?.data?.onSelected(obj?.data);
|
8512
|
-
self.onClickCompoent.emit(
|
8513
|
-
left: e?.['Wr']?.x,
|
8514
|
-
top: e?.['Wr']?.y,
|
8515
|
-
node: node,
|
8516
|
-
component: obj?.data,
|
8517
|
-
});
|
8524
|
+
self.onClickCompoent.emit(outputPayload);
|
8518
8525
|
}
|
8519
8526
|
},
|
8520
8527
|
selectionChanged: (e) => {
|
@@ -8522,7 +8529,7 @@ class AtoDefaultGojsEditor {
|
|
8522
8529
|
e?.data?.onSelected(null);
|
8523
8530
|
}
|
8524
8531
|
},
|
8525
|
-
selectionAdornmentTemplate: this._initialOptions.isReadOnly
|
8532
|
+
selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
|
8526
8533
|
? null
|
8527
8534
|
: this.$(go.Adornment, 'Spot', {
|
8528
8535
|
shadowVisible: true,
|
@@ -8543,8 +8550,7 @@ class AtoDefaultGojsEditor {
|
|
8543
8550
|
? this.generateActionGroup([
|
8544
8551
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.RO_WATER_TREATMENT].name,
|
8545
8552
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.COOLING_TOWER].name,
|
8546
|
-
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER]
|
8547
|
-
.name,
|
8553
|
+
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.BOILER].name,
|
8548
8554
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.IMMERSED_UF_WATER_TREATMENTS].name,
|
8549
8555
|
AtoGojsEditorModel.NODE_TEMPLATES[AtoGojsEditorModel.ENUM_TEMPLATES.PRESSURIZED_UF_WATER_TREATMENTS].name,
|
8550
8556
|
].includes(title)
|
@@ -8762,6 +8768,7 @@ class AtoDefaultGojsEditor {
|
|
8762
8768
|
// self.onHoverAlert.emit(null);
|
8763
8769
|
},
|
8764
8770
|
click: (e, obj) => {
|
8771
|
+
console.log('TEST');
|
8765
8772
|
if (obj?.data?.onSelected) {
|
8766
8773
|
obj?.data?.onSelected(obj?.data);
|
8767
8774
|
self.onClickCompoent.emit({
|
@@ -8889,14 +8896,19 @@ class AtoDefaultGojsEditor {
|
|
8889
8896
|
// self.showPoint(obj?.part?.location);
|
8890
8897
|
},
|
8891
8898
|
click: (e, obj) => {
|
8899
|
+
const outputPayload = {
|
8900
|
+
left: e?.['Wr']?.x,
|
8901
|
+
top: e?.['Wr']?.y,
|
8902
|
+
node: node,
|
8903
|
+
component: obj?.data,
|
8904
|
+
};
|
8905
|
+
if (this.isSelectBox) {
|
8906
|
+
self.onClickCompoent.emit(outputPayload);
|
8907
|
+
return;
|
8908
|
+
}
|
8892
8909
|
if (obj?.data?.onSelected) {
|
8893
8910
|
obj?.data?.onSelected(obj?.data);
|
8894
|
-
self.onClickCompoent.emit(
|
8895
|
-
left: e?.['Wr']?.x,
|
8896
|
-
top: e?.['Wr']?.y,
|
8897
|
-
node: node,
|
8898
|
-
component: obj?.data,
|
8899
|
-
});
|
8911
|
+
self.onClickCompoent.emit(outputPayload);
|
8900
8912
|
}
|
8901
8913
|
},
|
8902
8914
|
selectionChanged: (e) => {
|
@@ -8904,7 +8916,7 @@ class AtoDefaultGojsEditor {
|
|
8904
8916
|
e?.data?.onSelected(null);
|
8905
8917
|
}
|
8906
8918
|
},
|
8907
|
-
selectionAdornmentTemplate: this._initialOptions.isReadOnly
|
8919
|
+
selectionAdornmentTemplate: this._initialOptions.isReadOnly || this.isSelectBox
|
8908
8920
|
? null
|
8909
8921
|
: this.$(go.Adornment, 'Spot', this.$(go.Panel, 'Auto', this.$(go.Shape, {
|
8910
8922
|
fill: null,
|
@@ -9411,7 +9423,7 @@ class AtoDefaultGojsEditor {
|
|
9411
9423
|
}
|
9412
9424
|
case 'T':
|
9413
9425
|
case 'L': {
|
9414
|
-
panel.background = '
|
9426
|
+
panel.background = '#54bbba';
|
9415
9427
|
break;
|
9416
9428
|
}
|
9417
9429
|
default: {
|
@@ -9448,14 +9460,16 @@ class AtoDefaultGojsEditor {
|
|
9448
9460
|
switch (name) {
|
9449
9461
|
case 'B':
|
9450
9462
|
case 'R': {
|
9451
|
-
if (data?.
|
9463
|
+
if (data?.type !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
|
9464
|
+
data?.systemType === AtoGojsEditorModel.WaterDischargeDestinations) {
|
9452
9465
|
return false;
|
9453
9466
|
}
|
9454
9467
|
return !data?.isNotSelectOutput;
|
9455
9468
|
}
|
9456
9469
|
case 'T':
|
9457
9470
|
case 'L': {
|
9458
|
-
if (data?.
|
9471
|
+
if (data?.type !== AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE &&
|
9472
|
+
data?.systemType === AtoGojsEditorModel.WaterWithdrawSources) {
|
9459
9473
|
return false;
|
9460
9474
|
}
|
9461
9475
|
return !data?.isNotSelectInput;
|