internal bool setMainObject(ChartObject main) { if (main == null) { return(false); } if (main.getType() != ItemType.Arrow && main.getType() != ItemType.Box && main.getType() != ItemType.Table && main.getType() != ItemType.ControlHost) { return(false); } if (!main.setGroup(this)) { return(false); } mainObj = main; if (mainObj.getType() == ItemType.Arrow) { prevPoints = ((Arrow)mainObj).Points.Clone(); } else { prevRect = mainObj.getBoundingRect(); prevRotation = (mainObj as Node).rotation(); } return(true); }
internal virtual void onDelete() { if (mainObj != null) { mainObj.setGroup(null); } mainObj = null; foreach (Attachment attc in attachments) { attc.node.putInGroup(null); } attachments.Clear(); attachedObjects.Clear(); }
internal bool setMainObject(ChartObject main) { if (main == null) return false; if (main.getType() != ItemType.Arrow && main.getType() != ItemType.Box && main.getType() != ItemType.Table && main.getType() != ItemType.ControlHost) return false; if (!main.setGroup(this)) return false; mainObj = main; if (mainObj.getType() == ItemType.Arrow) { prevPoints = ((Arrow)mainObj).Points.Clone(); } else { prevRect = mainObj.getBoundingRect(); prevRotation = (mainObj as Node).rotation(); } return true; }