ato-water-lib 0.0.30 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
@@ -4806,13 +4806,11 @@ class AtoDefaultGojsEditor {
4806
4806
  onClickFn = () => {
4807
4807
  self.clickNewNode(e, _.merge(obj, {
4808
4808
  actionMove: self.dragNewNode,
4809
- _dragData: {
4809
+ _dragData: Object.assign({
4810
4810
  type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE,
4811
4811
  name: `${AtoGojsEditorModel.ACTION_RIGHT_MENU_GROUP.DATA_BOX}_${moment().valueOf()}`,
4812
4812
  color: AtoGojsEditorModel.ENUM_COLORS.BLUE,
4813
- movable: self.plantSatus === ATO_EPlantType.BASIC_PLANT ? false : true,
4814
- isNotAllowConnect: self.plantSatus === ATO_EPlantType.BASIC_PLANT ? true : null,
4815
- },
4813
+ }, self.setProFOrNewNode(self)),
4816
4814
  }));
4817
4815
  };
4818
4816
  break;
@@ -4846,6 +4844,17 @@ class AtoDefaultGojsEditor {
4846
4844
  cursor: 'pointer',
4847
4845
  }));
4848
4846
  }
4847
+ setProFOrNewNode(self) {
4848
+ return __awaiter(this, void 0, void 0, function* () {
4849
+ if (self.plantSatus === ATO_EPlantType.BASIC_PLANT) {
4850
+ return {
4851
+ movable: false,
4852
+ isNotAllowConnect: true,
4853
+ };
4854
+ }
4855
+ return {};
4856
+ });
4857
+ }
4849
4858
  clickNewNode(e, button) {
4850
4859
  var _a;
4851
4860
  return __awaiter(this, void 0, void 0, function* () {