import { Selection } from "./Selection"; import { ConnectorProperties } from "../Model/Connectors/ConnectorProperties"; import { Style, TextStyle, StyleBase } from "../Model/Style"; export class InputPositionProperties { private connectorProperties: ConnectorProperties; private style: Style; private textStyle: TextStyle; constructor(private selection: Selection, private baseProperties?: InputPositionProperties, private disableMergingStyles?: boolean) { this.selection = selection; } reset() { this.connectorProperties = null; this.style = null; this.textStyle = null; } getConnectorProperties(): ConnectorProperties { if(!this.connectorProperties) { this.connectorProperties = this.baseProperties ? this.baseProperties.getConnectorProperties().clone() : new ConnectorProperties(); this.updateConnectorProperties(this.connectorProperties); } return this.connectorProperties; } getConnectorPropertyValue(propertyName: string): any { return this.getConnectorProperties()[propertyName]; } setConnectorPropertyValue(propertyName: string, value: any) { this.getConnectorProperties()[propertyName] = value; } getStyle(): Style { if(!this.style) { this.style = this.baseProperties ?