ato-water-lib 0.0.29 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
@@ -4782,11 +4782,12 @@ class AtoDefaultGojsEditor {
4782
4782
  self.clickNewNode(e, _.merge(obj, {
4783
4783
  actionMove: self.dragNewNode,
4784
4784
  _dragData: {
4785
- type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE,
4786
- name: `${AtoGojsEditorModel.ACTION_RIGHT_MENU_GROUP.DATA_BOX}_${moment().valueOf()}`,
4787
- color: AtoGojsEditorModel.ENUM_COLORS.BLUE,
4788
- movable: self.plantSatus === ATO_EPlantType.BASIC_PLANT ? false : null,
4789
- isNotAllowConnect: self.plantSatus === ATO_EPlantType.BASIC_PLANT ? true : null,
4785
+ ...{
4786
+ type: AtoGojsEditorModel.ENUM_TEMPLATES.TEXT_NODE,
4787
+ name: `${AtoGojsEditorModel.ACTION_RIGHT_MENU_GROUP.DATA_BOX}_${moment().valueOf()}`,
4788
+ color: AtoGojsEditorModel.ENUM_COLORS.BLUE,
4789
+ },
4790
+ ...self.setProFOrNewNode(self)
4790
4791
  },
4791
4792
  }));
4792
4793
  };
@@ -4824,6 +4825,15 @@ class AtoDefaultGojsEditor {
4824
4825
  cursor: 'pointer',
4825
4826
  }));
4826
4827
  }
4828
+ async setProFOrNewNode(self) {
4829
+ if (self.plantSatus === ATO_EPlantType.BASIC_PLANT) {
4830
+ return {
4831
+ movable: false,
4832
+ isNotAllowConnect: true,
4833
+ };
4834
+ }
4835
+ return {};
4836
+ }
4827
4837
  async clickNewNode(e, button) {
4828
4838
  const data = button._dragData;
4829
4839
  if (!data)