@syncfusion/ej2-diagrams
Advanced tools
Comparing version 17.2.41 to 17.2.46
@@ -9,2 +9,10 @@ # Changelog | ||
- `#245696`,`#245047`,`#244836` - Now, the Angular diagram will be rendered properly when we set the target as es6/es2015 in ts.config file. | ||
## 17.2.41 (2019-08-14) | ||
### Diagram | ||
#### Bug Fixes | ||
- `#146327` - The issue "Layout not working for Group Node" is now resolved. | ||
@@ -11,0 +19,0 @@ - `#243648` - The issue "Exception raised while adding UML class shapes at runtime" is now resolved. |
/*! | ||
* filename: index.d.ts | ||
* version : 17.2.41 | ||
* version : 17.2.46 | ||
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"_from": "@syncfusion/ej2-diagrams@*", | ||
"_id": "@syncfusion/ej2-diagrams@17.2.40", | ||
"_id": "@syncfusion/ej2-diagrams@17.2.41", | ||
"_inBundle": false, | ||
"_integrity": "sha512-z3xZO3Z5e9PoqFN61GxVOL1YWVPRJdlrLAr0qONhEFpdMIJRcjW79CrpzU5lQBgO4fVwmJu72ZDW1iMixKLa2A==", | ||
"_integrity": "sha512-2FSwGSlrNQjDLfO+yVH8F9Ye3dJx+zsI3XDkn2+46oh77dEay12g6Y1f/XKXam+WjUlUXZ7blqb3CfYJuYZmFQ==", | ||
"_location": "/@syncfusion/ej2-diagrams", | ||
@@ -26,4 +26,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-diagrams/-/ej2-diagrams-17.2.40.tgz", | ||
"_shasum": "d4916dd3631b97d2d40446d1ecc3d15e35f2b7ea", | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-diagrams/-/ej2-diagrams-17.2.41.tgz", | ||
"_shasum": "8462707f1d5d7bfd346cfc4fb55e4aa0e16d59cb", | ||
"_spec": "@syncfusion/ej2-diagrams@*", | ||
@@ -39,9 +39,9 @@ "_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~17.2.40", | ||
"@syncfusion/ej2-buttons": "~17.2.35", | ||
"@syncfusion/ej2-data": "~17.2.39", | ||
"@syncfusion/ej2-inputs": "~17.2.41", | ||
"@syncfusion/ej2-lists": "~17.2.34", | ||
"@syncfusion/ej2-navigations": "~17.2.41", | ||
"@syncfusion/ej2-popups": "~17.2.35" | ||
"@syncfusion/ej2-base": "~17.2.46", | ||
"@syncfusion/ej2-buttons": "~17.2.46", | ||
"@syncfusion/ej2-data": "~17.2.46", | ||
"@syncfusion/ej2-inputs": "~17.2.46", | ||
"@syncfusion/ej2-lists": "~17.2.46", | ||
"@syncfusion/ej2-navigations": "~17.2.46", | ||
"@syncfusion/ej2-popups": "~17.2.46" | ||
}, | ||
@@ -70,4 +70,4 @@ "deprecated": false, | ||
"typings": "index.d.ts", | ||
"version": "17.2.41", | ||
"version": "17.2.46", | ||
"sideEffects": false | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Component, Property, Complex, Collection, EventHandler, L10n, Droppable, remove, Ajax, isBlazor } from '@syncfusion/ej2-base';import { Browser, ModuleDeclaration, Event, EmitType } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, updateBlazorTemplate, resetBlazorTemplate } from '@syncfusion/ej2-base';import { CanvasRenderer } from './rendering/canvas-renderer';import { SvgRenderer } from './rendering/svg-renderer';import { DiagramRenderer } from './rendering/renderer';import { BaseAttributes } from './rendering/canvas-interface';import { PageSettings, ScrollSettings } from './diagram/page-settings';import { PageSettingsModel, ScrollSettingsModel } from './diagram/page-settings-model';import { DiagramElement } from './core/elements/diagram-element';import { ServiceLocator } from './objects/service';import { IElement, IDataLoadedEventArgs, ISelectionChangeEventArgs, IClickEventArgs, ScrollValues } from './objects/interface/IElement';import { ISizeChangeEventArgs, IConnectionChangeEventArgs, IEndChangeEventArgs, IDoubleClickEventArgs } from './objects/interface/IElement';import { ICollectionChangeEventArgs, IPropertyChangeEventArgs, IDraggingEventArgs, IRotationEventArgs } from './objects/interface/IElement';import { ISegmentCollectionChangeEventArgs } from './objects/interface/IElement';import { IDragEnterEventArgs, IDragLeaveEventArgs, IDragOverEventArgs, IDropEventArgs } from './objects/interface/IElement';import { ITextEditEventArgs, IHistoryChangeArgs, IScrollChangeEventArgs, IMouseEventArgs } from './objects/interface/IElement';import { StackEntryObject, IExpandStateChangeEventArgs } from './objects/interface/IElement';import { ZoomOptions, IPrintOptions, IExportOptions, IFitOptions, ActiveLabel } from './objects/interface/interfaces';import { View, IDataSource, IFields } from './objects/interface/interfaces';import { Container } from './core/containers/container';import { Node, BpmnShape, BpmnAnnotation, SwimLane, Path } from './objects/node';import { flipConnector, updatePortEdges, alignElement } from './utility/diagram-util';import { Segment } from './interaction/scroller';import { Connector } from './objects/connector';import { ConnectorModel, BpmnFlowModel } from './objects/connector-model';import { SnapSettings } from './diagram/grid-lines';import { RulerSettings } from './diagram/ruler-settings';import { removeRulerElements, updateRuler, getRulerSize } from './ruler/ruler';import { renderRuler, renderOverlapElement } from './ruler/ruler';import { RulerSettingsModel } from './diagram/ruler-settings-model';import { SnapSettingsModel } from './diagram/grid-lines-model';import { NodeModel, TextModel, BpmnShapeModel, BpmnAnnotationModel, HeaderModel, HtmlModel } from './objects/node-model';import { UmlActivityShapeModel, SwimLaneModel, LaneModel, PhaseModel } from './objects/node-model';import { Size } from './primitives/size';import { Keys, KeyModifiers, DiagramTools, AlignmentMode, AnnotationConstraints, NodeConstraints, RendererAction } from './enum/enum';import { DiagramConstraints, BridgeDirection, AlignmentOptions, SelectorConstraints, PortVisibility, DiagramEvent } from './enum/enum';import { DistributeOptions, SizingOptions, RenderingMode, DiagramAction, ThumbsConstraints, NudgeDirection } from './enum/enum';import { RealAction, ElementAction, FlipDirection, Orientation, PortConstraints } from './enum/enum';import { PathElement } from './core/elements/path-element';import { TextElement } from './core/elements/text-element';import { updateStyle, removeItem, updateConnector, updateShape, setUMLActivityDefaults, findNodeByName } from './utility/diagram-util';import { setSwimLaneDefaults } from './utility/diagram-util';import { checkPortRestriction, serialize, deserialize, updateHyperlink, getObjectType, removeGradient } from './utility/diagram-util';import { Rect } from './primitives/rect';import { getPortShape } from './objects/dictionary/common';import { PointPortModel } from './objects/port-model';import { ShapeAnnotationModel, AnnotationModel, PathAnnotationModel } from './objects/annotation-model';import { ShapeAnnotation, PathAnnotation, Annotation } from './objects/annotation';import { PointModel } from './primitives/point-model';import { Canvas } from './core/containers/canvas';import { GridPanel, ColumnDefinition } from './core/containers/grid';import { DataSourceModel } from './diagram/data-source-model';import { DataSource } from './diagram/data-source';import { LayoutModel } from './layout/layout-base-model';import { Layout, INode, ILayout } from './layout/layout-base';import { DataBinding } from './data-binding/data-binding';import { Selector } from './interaction/selector';import { SelectorModel } from './interaction/selector-model';import { DiagramEventHandler } from './interaction/event-handlers';import { CommandHandler } from './interaction/command-manager';import { DiagramScroller } from './interaction/scroller';import { Actions, isSelected } from './interaction/actions';import { ToolBase } from './interaction/tool';import { BpmnDiagrams } from './objects/bpmn';import { DiagramContextMenu } from './objects/context-menu';import { ConnectorBridging } from './objects/connector-bridging';import { SpatialSearch } from './interaction/spatial-search/spatial-search';import { HistoryEntry, History } from './diagram/history';import { UndoRedo } from './objects/undo-redo';import { ConnectorEditing } from './interaction/connector-editing';import { Ruler } from '../ruler/index';import { BeforeOpenCloseMenuEventArgs, MenuEventArgs, EJ2Instance } from '@syncfusion/ej2-navigations';import { setAttributeSvg, setAttributeHtml, measureHtmlText, removeElement, createMeasureElements, getDomIndex } from './utility/dom-util';import { getDiagramElement, getScrollerWidth, getHTMLLayer } from './utility/dom-util';import { getBackgroundLayer, createHtmlElement, createSvgElement, getNativeLayerSvg } from './utility/dom-util';import { getPortLayerSvg, getDiagramLayerSvg } from './utility/dom-util';import { getAdornerLayerSvg, getSelectorElement, getGridLayerSvg, getBackgroundLayerSvg } from './utility/dom-util';import { CommandManager, ContextMenuSettings } from './diagram/keyboard-commands';import { CommandManagerModel, CommandModel, ContextMenuSettingsModel } from './diagram/keyboard-commands-model';import { canDelete, canInConnect, canOutConnect, canRotate, canVitualize, canDrawThumbs } from './utility/constraints-util';import { canPortInConnect, canPortOutConnect } from './utility/constraints-util';import { canResize, canSingleSelect, canZoomPan, canZoomTextEdit } from './utility/constraints-util';import { canDragSourceEnd, canDragTargetEnd, canDragSegmentThumb, enableReadOnly, canMove } from './utility/constraints-util';import { findAnnotation, arrangeChild, getInOutConnectPorts, removeChildNodes } from './utility/diagram-util';import { randomId, cloneObject, extendObject, getFunction, getBounds } from './utility/base-util';import { Snapping } from './objects/snapping';import { DiagramTooltipModel } from './objects/tooltip-model';import { TextStyleModel, ShadowModel } from './core/appearance-model';import { TransformFactor } from './interaction/scroller';import { RadialTree } from './layout/radial-tree';import { HierarchicalTree } from './layout/hierarchical-tree';import { ComplexHierarchicalTree } from './layout/complex-hierarchical-tree';import { MindMap } from './layout/mind-map';import { DiagramTooltip, initTooltip } from './objects/tooltip';import { Tooltip } from '@syncfusion/ej2-popups';import { PrintAndExport } from './print-settings';import { Port, PointPort } from './objects/port';import { SymmetricLayout, IGraphObject } from './layout/symmetrical-layout';import { LayoutAnimation } from './objects/layout-animation';import { canShadow } from './utility/constraints-util';import { Layer } from './diagram/layer';import { LayerModel } from './diagram/layer-model';import { DiagramNativeElement } from './core/elements/native-element';import { DiagramHtmlElement } from './core/elements/html-element';import { IconShapeModel } from './objects/icon-model';import { canAllowDrop } from './utility/constraints-util';import { checkParentAsContainer, addChildToContainer, updateLaneBoundsAfterAddChild } from './interaction/container-interaction';import { DataManager } from '@syncfusion/ej2-data';import { getConnectors, updateConnectorsProperties, phaseDefine } from './utility/swim-lane-util';import { swimLaneMeasureAndArrange } from './utility/swim-lane-util';import { arrangeChildNodesInSwimLane, updateHeaderMaxWidth, updatePhaseMaxWidth } from './utility/swim-lane-util';import { addLane, addPhase } from './utility/swim-lane-util';import { ContextMenuItemModel } from './../diagram/objects/interface/interfaces';import { SerializationSettingsModel } from './diagram/serialization-settings-model';import { SerializationSettings } from './diagram/serialization-settings';import { removeSwimLane, removeLane, removePhase, removeLaneChildNode } from './utility/swim-lane-util';import { RowDefinition } from './core/containers/grid';import { LineRouting } from './interaction/line-routing'; | ||
import { Component, Property, Complex, Collection, EventHandler, L10n, Droppable, remove, Ajax, isBlazor } from '@syncfusion/ej2-base';import { Browser, ModuleDeclaration, Event, EmitType } from '@syncfusion/ej2-base';import { INotifyPropertyChanged, updateBlazorTemplate, resetBlazorTemplate } from '@syncfusion/ej2-base';import { CanvasRenderer } from './rendering/canvas-renderer';import { SvgRenderer } from './rendering/svg-renderer';import { DiagramRenderer } from './rendering/renderer';import { BaseAttributes } from './rendering/canvas-interface';import { PageSettings, ScrollSettings } from './diagram/page-settings';import { PageSettingsModel, ScrollSettingsModel } from './diagram/page-settings-model';import { DiagramElement } from './core/elements/diagram-element';import { ServiceLocator } from './objects/service';import { IElement, IDataLoadedEventArgs, ISelectionChangeEventArgs, IClickEventArgs, ScrollValues } from './objects/interface/IElement';import { ISizeChangeEventArgs, IConnectionChangeEventArgs, IEndChangeEventArgs, IDoubleClickEventArgs } from './objects/interface/IElement';import { ICollectionChangeEventArgs, IPropertyChangeEventArgs, IDraggingEventArgs, IRotationEventArgs } from './objects/interface/IElement';import { ISegmentCollectionChangeEventArgs } from './objects/interface/IElement';import { IDragEnterEventArgs, IDragLeaveEventArgs, IDragOverEventArgs, IDropEventArgs } from './objects/interface/IElement';import { ITextEditEventArgs, IHistoryChangeArgs, IScrollChangeEventArgs, IMouseEventArgs } from './objects/interface/IElement';import { StackEntryObject, IExpandStateChangeEventArgs } from './objects/interface/IElement';import { ZoomOptions, IPrintOptions, IExportOptions, IFitOptions, ActiveLabel } from './objects/interface/interfaces';import { View, IDataSource, IFields } from './objects/interface/interfaces';import { Container } from './core/containers/container';import { Node, BpmnShape, BpmnAnnotation, SwimLane, Path } from './objects/node';import { flipConnector, updatePortEdges, alignElement } from './utility/diagram-util';import { Segment } from './interaction/scroller';import { Connector } from './objects/connector';import { ConnectorModel, BpmnFlowModel } from './objects/connector-model';import { SnapSettings } from './diagram/grid-lines';import { RulerSettings } from './diagram/ruler-settings';import { removeRulerElements, updateRuler, getRulerSize } from './ruler/ruler';import { renderRuler, renderOverlapElement } from './ruler/ruler';import { RulerSettingsModel } from './diagram/ruler-settings-model';import { SnapSettingsModel } from './diagram/grid-lines-model';import { NodeModel, TextModel, BpmnShapeModel, BpmnAnnotationModel, HeaderModel, HtmlModel } from './objects/node-model';import { UmlActivityShapeModel, SwimLaneModel, LaneModel, PhaseModel } from './objects/node-model';import { Size } from './primitives/size';import { Keys, KeyModifiers, DiagramTools, AlignmentMode, AnnotationConstraints, NodeConstraints, RendererAction } from './enum/enum';import { DiagramConstraints, BridgeDirection, AlignmentOptions, SelectorConstraints, PortVisibility, DiagramEvent } from './enum/enum';import { DistributeOptions, SizingOptions, RenderingMode, DiagramAction, ThumbsConstraints, NudgeDirection } from './enum/enum';import { RealAction, ElementAction, FlipDirection, Orientation, PortConstraints } from './enum/enum';import { PathElement } from './core/elements/path-element';import { TextElement } from './core/elements/text-element';import { updateStyle, removeItem, updateConnector, updateShape, setUMLActivityDefaults, findNodeByName } from './utility/diagram-util';import { setSwimLaneDefaults } from './utility/diagram-util';import { checkPortRestriction, serialize, deserialize, updateHyperlink, getObjectType, removeGradient } from './utility/diagram-util';import { Rect } from './primitives/rect';import { getPortShape } from './objects/dictionary/common';import { PointPortModel } from './objects/port-model';import { ShapeAnnotationModel, AnnotationModel, PathAnnotationModel } from './objects/annotation-model';import { ShapeAnnotation, PathAnnotation, Annotation } from './objects/annotation';import { PointModel } from './primitives/point-model';import { Canvas } from './core/containers/canvas';import { GridPanel, ColumnDefinition } from './core/containers/grid';import { DataSourceModel } from './diagram/data-source-model';import { DataSource } from './diagram/data-source';import { LayoutModel } from './layout/layout-base-model';import { Layout, INode, ILayout } from './layout/layout-base';import { DataBinding } from './data-binding/data-binding';import { Selector } from './objects/node';import { SelectorModel } from './objects/node-model';import { DiagramEventHandler } from './interaction/event-handlers';import { CommandHandler } from './interaction/command-manager';import { DiagramScroller } from './interaction/scroller';import { Actions, isSelected } from './interaction/actions';import { ToolBase } from './interaction/tool';import { BpmnDiagrams } from './objects/bpmn';import { DiagramContextMenu } from './objects/context-menu';import { ConnectorBridging } from './objects/connector-bridging';import { SpatialSearch } from './interaction/spatial-search/spatial-search';import { HistoryEntry, History } from './diagram/history';import { UndoRedo } from './objects/undo-redo';import { ConnectorEditing } from './interaction/connector-editing';import { Ruler } from '../ruler/index';import { BeforeOpenCloseMenuEventArgs, MenuEventArgs, EJ2Instance } from '@syncfusion/ej2-navigations';import { setAttributeSvg, setAttributeHtml, measureHtmlText, removeElement, createMeasureElements, getDomIndex } from './utility/dom-util';import { getDiagramElement, getScrollerWidth, getHTMLLayer } from './utility/dom-util';import { getBackgroundLayer, createHtmlElement, createSvgElement, getNativeLayerSvg } from './utility/dom-util';import { getPortLayerSvg, getDiagramLayerSvg } from './utility/dom-util';import { getAdornerLayerSvg, getSelectorElement, getGridLayerSvg, getBackgroundLayerSvg } from './utility/dom-util';import { CommandManager, ContextMenuSettings } from './diagram/keyboard-commands';import { CommandManagerModel, CommandModel, ContextMenuSettingsModel } from './diagram/keyboard-commands-model';import { canDelete, canInConnect, canOutConnect, canRotate, canVitualize, canDrawThumbs } from './utility/constraints-util';import { canPortInConnect, canPortOutConnect } from './utility/constraints-util';import { canResize, canSingleSelect, canZoomPan, canZoomTextEdit } from './utility/constraints-util';import { canDragSourceEnd, canDragTargetEnd, canDragSegmentThumb, enableReadOnly, canMove } from './utility/constraints-util';import { findAnnotation, arrangeChild, getInOutConnectPorts, removeChildNodes } from './utility/diagram-util';import { randomId, cloneObject, extendObject, getFunction, getBounds } from './utility/base-util';import { Snapping } from './objects/snapping';import { DiagramTooltipModel } from './objects/tooltip-model';import { TextStyleModel, ShadowModel } from './core/appearance-model';import { TransformFactor } from './interaction/scroller';import { RadialTree } from './layout/radial-tree';import { HierarchicalTree } from './layout/hierarchical-tree';import { ComplexHierarchicalTree } from './layout/complex-hierarchical-tree';import { MindMap } from './layout/mind-map';import { DiagramTooltip, initTooltip } from './objects/tooltip';import { Tooltip } from '@syncfusion/ej2-popups';import { PrintAndExport } from './print-settings';import { Port, PointPort } from './objects/port';import { SymmetricLayout, IGraphObject } from './layout/symmetrical-layout';import { LayoutAnimation } from './objects/layout-animation';import { canShadow } from './utility/constraints-util';import { Layer } from './diagram/layer';import { LayerModel } from './diagram/layer-model';import { DiagramNativeElement } from './core/elements/native-element';import { DiagramHtmlElement } from './core/elements/html-element';import { IconShapeModel } from './objects/icon-model';import { canAllowDrop } from './utility/constraints-util';import { checkParentAsContainer, addChildToContainer, updateLaneBoundsAfterAddChild } from './interaction/container-interaction';import { DataManager } from '@syncfusion/ej2-data';import { getConnectors, updateConnectorsProperties, phaseDefine } from './utility/swim-lane-util';import { swimLaneMeasureAndArrange } from './utility/swim-lane-util';import { arrangeChildNodesInSwimLane, updateHeaderMaxWidth, updatePhaseMaxWidth } from './utility/swim-lane-util';import { addLane, addPhase } from './utility/swim-lane-util';import { ContextMenuItemModel } from './../diagram/objects/interface/interfaces';import { SerializationSettingsModel } from './diagram/serialization-settings-model';import { SerializationSettings } from './diagram/serialization-settings';import { removeSwimLane, removeLane, removePhase, removeLaneChildNode } from './utility/swim-lane-util';import { RowDefinition } from './core/containers/grid';import { LineRouting } from './interaction/line-routing'; | ||
import {ComponentModel} from '@syncfusion/ej2-base'; | ||
@@ -3,0 +3,0 @@ |
@@ -40,4 +40,4 @@ import { Component, L10n, Droppable } from '@syncfusion/ej2-base'; | ||
import { DataBinding } from './data-binding/data-binding'; | ||
import { Selector } from './interaction/selector'; | ||
import { SelectorModel } from './interaction/selector-model'; | ||
import { Selector } from './objects/node'; | ||
import { SelectorModel } from './objects/node-model'; | ||
import { CommandHandler } from './interaction/command-manager'; | ||
@@ -44,0 +44,0 @@ import { DiagramScroller } from './interaction/scroller'; |
@@ -1,2 +0,2 @@ | ||
import { SelectorModel } from '../interaction/selector-model'; | ||
import { SelectorModel } from '../objects/node-model'; | ||
import { ConnectorModel } from '../objects/connector-model'; | ||
@@ -3,0 +3,0 @@ import { NodeModel, PhaseModel } from '../objects/node-model'; |
@@ -48,3 +48,3 @@ /** | ||
export * from './objects/layout-animation'; | ||
//interaction | ||
//interaction | ||
export * from './interaction/selector'; | ||
@@ -51,0 +51,0 @@ export * from './interaction/tool'; |
@@ -12,3 +12,3 @@ import { Connector } from '../objects/connector'; | ||
import { PortConstraints, DiagramTools, PortVisibility, ThumbsConstraints } from '../enum/enum'; | ||
import { Selector } from './selector'; | ||
import { Selector } from '../objects/node'; | ||
import { PointPort } from './../objects/port'; | ||
@@ -15,0 +15,0 @@ import { ShapeAnnotation, PathAnnotation } from '../objects/annotation'; |
@@ -12,4 +12,4 @@ import { IElement } from '../objects/interface/IElement'; | ||
import { DiagramElement } from './../core/elements/diagram-element'; | ||
import { SelectorModel } from './selector-model'; | ||
import { Selector } from './selector'; | ||
import { SelectorModel } from '../objects/node-model'; | ||
import { Selector } from '../objects/node'; | ||
import { AlignmentOptions, DistributeOptions, SizingOptions, DiagramEvent, AlignmentMode } from '../enum/enum'; | ||
@@ -16,0 +16,0 @@ import { HistoryEntry } from '../diagram/history'; |
@@ -6,3 +6,3 @@ import { NodeModel } from '../objects/node-model'; | ||
import { PointModel } from '../primitives/point-model'; | ||
import { SelectorModel } from './selector-model'; | ||
import { SelectorModel } from '../objects/node-model'; | ||
import { Rect } from '../primitives/rect'; | ||
@@ -9,0 +9,0 @@ import { DiagramElement } from '../core/elements/diagram-element'; |
import { Node } from '../objects/node'; | ||
import { Selector } from './selector'; | ||
import { Selector } from '../objects/node'; | ||
import { Size } from '../primitives/size'; | ||
@@ -4,0 +4,0 @@ import { cloneObject } from './../utility/base-util'; |
@@ -1,2 +0,2 @@ | ||
import { Property, ChildProperty, Collection, Complex } from '@syncfusion/ej2-base';import { IElement } from '../objects/interface/IElement';import { Container } from '../core/containers/container';import { Node } from '../objects/node';import { Connector } from '../objects/connector';import { PointModel } from '../primitives/point-model';import { Point } from '../primitives/point';import { Size } from '../primitives/size';import { RubberBandSelectionMode, Side, ThumbsConstraints } from '../enum/enum';import { SelectorConstraints, HorizontalAlignment, VerticalAlignment } from '../enum/enum';import { NodeModel } from '../objects/node-model';import { ConnectorModel } from '../objects/connector-model';import { Diagram } from '../../diagram/diagram';import { MarginModel } from '../core/appearance-model';import { Margin } from '../core/appearance';import { ShapeAnnotationModel, PathAnnotationModel } from '../objects/annotation-model';import { DiagramElement } from '../core/elements/diagram-element'; | ||
import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';import { Side } from '../enum/enum';import { HorizontalAlignment, VerticalAlignment } from '../enum/enum';import { MarginModel } from '../core/appearance-model';import { Margin } from '../core/appearance'; | ||
@@ -119,148 +119,2 @@ /** | ||
} | ||
/** | ||
* Interface for a class Selector | ||
*/ | ||
export interface SelectorModel { | ||
/** | ||
* Defines the size and position of the container | ||
* @default null | ||
*/ | ||
wrapper?: Container; | ||
/** | ||
* Defines the collection of selected nodes | ||
*/ | ||
nodes?: NodeModel[]; | ||
/** | ||
* Defines the collection of selected connectors | ||
*/ | ||
connectors?: ConnectorModel[]; | ||
/** | ||
* Sets/Gets the width of the container | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
*/ | ||
width?: number; | ||
/** | ||
* Sets/Gets the height of the container | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
*/ | ||
height?: number; | ||
/** | ||
* Sets the rotate angle of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
rotateAngle?: number; | ||
/** | ||
* Sets the positionX of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
offsetX?: number; | ||
/** | ||
* Sets the positionY of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
offsetY?: number; | ||
/** | ||
* Sets the pivot of the selector | ||
* @default { x: 0.5, y: 0.5 } | ||
*/ | ||
pivot?: PointModel; | ||
/** | ||
* Defines how to pick the objects to be selected using rubber band selection | ||
* * CompleteIntersect - Selects the objects that are contained within the selected region | ||
* * PartialIntersect - Selects the objects that are partially intersected with the selected region | ||
* @default 'CompleteIntersect' | ||
*/ | ||
rubberBandSelectionMode?: RubberBandSelectionMode; | ||
/** | ||
* Defines the collection of user handle | ||
* ```html | ||
* <div id='diagram'></div> | ||
* ``` | ||
* ```typescript | ||
* let nodes: NodeModel[] = [{ | ||
* id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100, | ||
* annotations: [{ content: 'Default Shape' }] | ||
* }, | ||
* { | ||
* id: 'node2', width: 100, height: 100, offsetX: 300, offsetY: 100, | ||
* shape: { | ||
* type: 'Basic', shape: 'Ellipse' | ||
* }, | ||
* annotations: [{ content: 'Path Element' }] | ||
* } | ||
* ]; | ||
* let connectors: ConnectorModel[] = [{ | ||
* id: 'connector1', | ||
* type: 'Straight', | ||
* sourcePoint: { x: 100, y: 300 }, | ||
* targetPoint: { x: 200, y: 400 }, | ||
* }]; | ||
* let handle: UserHandleModel[] = [ | ||
* { name: 'handle', margin: { top: 0, bottom: 0, left: 0, right: 0 }, offset: 0, | ||
* pathData: 'M 376.892,225.284L 371.279,211.95L 376.892,198.617L 350.225,211.95L 376.892,225.284 Z', | ||
* side: 'Top', horizontalAlignment: 'Center', verticalAlignment: 'Center', | ||
* pathColor: 'yellow' }]; | ||
* let diagram: Diagram = new Diagram({ | ||
* ... | ||
* connectors: connectors, nodes: nodes, | ||
* selectedItems: { constraints: SelectorConstraints.All, userHandles: handle }, | ||
* ... | ||
* }); | ||
* diagram.appendTo('#diagram'); | ||
* ``` | ||
* @default [] | ||
*/ | ||
userHandles?: UserHandleModel[]; | ||
/** | ||
* Controls the visibility of selector. | ||
* * None - Hides all the selector elements | ||
* * ConnectorSourceThumb - Shows/hides the source thumb of the connector | ||
* * ConnectorTargetThumb - Shows/hides the target thumb of the connector | ||
* * ResizeSouthEast - Shows/hides the bottom right resize handle of the selector | ||
* * ResizeSouthWest - Shows/hides the bottom left resize handle of the selector | ||
* * ResizeNorthEast - Shows/hides the top right resize handle of the selector | ||
* * ResizeNorthWest - Shows/hides the top left resize handle of the selector | ||
* * ResizeEast - Shows/hides the middle right resize handle of the selector | ||
* * ResizeWest - Shows/hides the middle left resize handle of the selector | ||
* * ResizeSouth - Shows/hides the bottom center resize handle of the selector | ||
* * ResizeNorth - Shows/hides the top center resize handle of the selector | ||
* * Rotate - Shows/hides the rotate handle of the selector | ||
* * UserHandles - Shows/hides the user handles of the selector | ||
* * Resize - Shows/hides all resize handles of the selector | ||
* @default 'All' | ||
* @aspNumberEnum | ||
* @blazorNumberEnum | ||
*/ | ||
constraints?: SelectorConstraints; | ||
/** | ||
* setTooltipTemplate helps to customize the content of a tooltip | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
* @deprecated | ||
*/ | ||
setTooltipTemplate?: Function | string; | ||
} |
import { ChildProperty } from '@syncfusion/ej2-base'; | ||
import { IElement } from '../objects/interface/IElement'; | ||
import { Container } from '../core/containers/container'; | ||
import { PointModel } from '../primitives/point-model'; | ||
import { RubberBandSelectionMode, Side, ThumbsConstraints } from '../enum/enum'; | ||
import { SelectorConstraints, HorizontalAlignment, VerticalAlignment } from '../enum/enum'; | ||
import { NodeModel } from '../objects/node-model'; | ||
import { ConnectorModel } from '../objects/connector-model'; | ||
import { UserHandleModel } from '../interaction/selector-model'; | ||
import { Diagram } from '../../diagram/diagram'; | ||
import { Side } from '../enum/enum'; | ||
import { HorizontalAlignment, VerticalAlignment } from '../enum/enum'; | ||
import { MarginModel } from '../core/appearance-model'; | ||
import { ShapeAnnotationModel, PathAnnotationModel } from '../objects/annotation-model'; | ||
/** | ||
@@ -154,158 +146,1 @@ * A collection of frequently used commands that will be added around the selector | ||
} | ||
/** | ||
* Defines the size and position of selected items and defines the appearance of selector | ||
*/ | ||
export declare class Selector extends ChildProperty<Selector> implements IElement { | ||
/** | ||
* Defines the size and position of the container | ||
* @default null | ||
*/ | ||
wrapper: Container; | ||
/** | ||
* Defines the collection of selected nodes | ||
*/ | ||
nodes: NodeModel[]; | ||
/** | ||
* Defines the collection of selected connectors | ||
*/ | ||
connectors: ConnectorModel[]; | ||
/** | ||
* @private | ||
*/ | ||
annotation: ShapeAnnotationModel | PathAnnotationModel; | ||
/** | ||
* Sets/Gets the width of the container | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
*/ | ||
width: number; | ||
/** | ||
* Sets/Gets the height of the container | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
*/ | ||
height: number; | ||
/** | ||
* Sets the rotate angle of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
rotateAngle: number; | ||
/** | ||
* Sets the positionX of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
offsetX: number; | ||
/** | ||
* Sets the positionY of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
offsetY: number; | ||
/** | ||
* Sets the pivot of the selector | ||
* @default { x: 0.5, y: 0.5 } | ||
*/ | ||
pivot: PointModel; | ||
/** | ||
* Defines how to pick the objects to be selected using rubber band selection | ||
* * CompleteIntersect - Selects the objects that are contained within the selected region | ||
* * PartialIntersect - Selects the objects that are partially intersected with the selected region | ||
* @default 'CompleteIntersect' | ||
*/ | ||
rubberBandSelectionMode: RubberBandSelectionMode; | ||
/** | ||
* Defines the collection of user handle | ||
* ```html | ||
* <div id='diagram'></div> | ||
* ``` | ||
* ```typescript | ||
* let nodes: NodeModel[] = [{ | ||
* id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100, | ||
* annotations: [{ content: 'Default Shape' }] | ||
* }, | ||
* { | ||
* id: 'node2', width: 100, height: 100, offsetX: 300, offsetY: 100, | ||
* shape: { | ||
* type: 'Basic', shape: 'Ellipse' | ||
* }, | ||
* annotations: [{ content: 'Path Element' }] | ||
* } | ||
* ]; | ||
* let connectors: ConnectorModel[] = [{ | ||
* id: 'connector1', | ||
* type: 'Straight', | ||
* sourcePoint: { x: 100, y: 300 }, | ||
* targetPoint: { x: 200, y: 400 }, | ||
* }]; | ||
* let handle: UserHandleModel[] = [ | ||
* { name: 'handle', margin: { top: 0, bottom: 0, left: 0, right: 0 }, offset: 0, | ||
* pathData: 'M 376.892,225.284L 371.279,211.95L 376.892,198.617L 350.225,211.95L 376.892,225.284 Z', | ||
* side: 'Top', horizontalAlignment: 'Center', verticalAlignment: 'Center', | ||
* pathColor: 'yellow' }]; | ||
* let diagram: Diagram = new Diagram({ | ||
* ... | ||
* connectors: connectors, nodes: nodes, | ||
* selectedItems: { constraints: SelectorConstraints.All, userHandles: handle }, | ||
* ... | ||
* }); | ||
* diagram.appendTo('#diagram'); | ||
* ``` | ||
* @default [] | ||
*/ | ||
userHandles: UserHandleModel[]; | ||
/** | ||
* Controls the visibility of selector. | ||
* * None - Hides all the selector elements | ||
* * ConnectorSourceThumb - Shows/hides the source thumb of the connector | ||
* * ConnectorTargetThumb - Shows/hides the target thumb of the connector | ||
* * ResizeSouthEast - Shows/hides the bottom right resize handle of the selector | ||
* * ResizeSouthWest - Shows/hides the bottom left resize handle of the selector | ||
* * ResizeNorthEast - Shows/hides the top right resize handle of the selector | ||
* * ResizeNorthWest - Shows/hides the top left resize handle of the selector | ||
* * ResizeEast - Shows/hides the middle right resize handle of the selector | ||
* * ResizeWest - Shows/hides the middle left resize handle of the selector | ||
* * ResizeSouth - Shows/hides the bottom center resize handle of the selector | ||
* * ResizeNorth - Shows/hides the top center resize handle of the selector | ||
* * Rotate - Shows/hides the rotate handle of the selector | ||
* * UserHandles - Shows/hides the user handles of the selector | ||
* * Resize - Shows/hides all resize handles of the selector | ||
* @default 'All' | ||
* @aspNumberEnum | ||
* @blazorNumberEnum | ||
*/ | ||
constraints: SelectorConstraints; | ||
/** | ||
* set the constraint of the container | ||
* * Rotate - Enable Rotate Thumb | ||
* * ConnectorSource - Enable Connector source point | ||
* * ConnectorTarget - Enable Connector target point | ||
* * ResizeNorthEast - Enable ResizeNorthEast Resize | ||
* * ResizeEast - Enable ResizeEast Resize | ||
* * ResizeSouthEast - Enable ResizeSouthEast Resize | ||
* * ResizeSouth - Enable ResizeSouth Resize | ||
* * ResizeSouthWest - Enable ResizeSouthWest Resize | ||
* * ResizeWest - Enable ResizeWest Resize | ||
* * ResizeNorthWest - Enable ResizeNorthWest Resize | ||
* * ResizeNorth - Enable ResizeNorth Resize | ||
* @private | ||
* @aspNumberEnum | ||
* @blazorNumberEnum | ||
*/ | ||
thumbsConstraints: ThumbsConstraints; | ||
/** | ||
* setTooltipTemplate helps to customize the content of a tooltip | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
* @deprecated | ||
*/ | ||
setTooltipTemplate: Function | string; | ||
/** | ||
* Initializes the UI of the container | ||
*/ | ||
init(diagram: Diagram): Container; | ||
} |
@@ -20,9 +20,3 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
import { Property, ChildProperty, Collection, Complex } from '@syncfusion/ej2-base'; | ||
import { Container } from '../core/containers/container'; | ||
import { Node } from '../objects/node'; | ||
import { Connector } from '../objects/connector'; | ||
import { Point } from '../primitives/point'; | ||
import { Size } from '../primitives/size'; | ||
import { SelectorConstraints } from '../enum/enum'; | ||
import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base'; | ||
import { Margin } from '../core/appearance'; | ||
@@ -131,90 +125,1 @@ /** | ||
export { UserHandle }; | ||
/** | ||
* Defines the size and position of selected items and defines the appearance of selector | ||
*/ | ||
var Selector = /** @class */ (function (_super) { | ||
__extends(Selector, _super); | ||
function Selector() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
/** | ||
* Initializes the UI of the container | ||
*/ | ||
Selector.prototype.init = function (diagram) { | ||
var container = new Container(); | ||
container.measureChildren = false; | ||
var consize = new Size(); | ||
container.children = []; | ||
if (this.annotation) { | ||
var object = (this.nodes.length > 0) ? diagram.nameTable[this.nodes[0].id].wrapper : | ||
diagram.nameTable[this.connectors[0].id].wrapper; | ||
var wrapper = diagram.getWrapper(object, this.annotation.id); | ||
container.children.push(wrapper); | ||
} | ||
else { | ||
if (this.nodes || this.connectors) { | ||
for (var i = 0; i < this.nodes.length; i++) { | ||
var node = diagram.nameTable[this.nodes[i].id]; | ||
var wrapper = node.wrapper; | ||
// this.width = wrapper.actualSize.width; | ||
// this.height = wrapper.actualSize.height; | ||
// this.rotateAngle = wrapper.rotateAngle; | ||
// this.offsetX = wrapper.offsetX; | ||
// this.offsetY = wrapper.offsetY; | ||
container.children.push(wrapper); | ||
} | ||
for (var j = 0; j < this.connectors.length; j++) { | ||
var connector = diagram.nameTable[this.connectors[j].id]; | ||
var wrapper = connector.wrapper; | ||
// this.width = wrapper.actualSize.width; this.height = wrapper.actualSize.height; | ||
// this.rotateAngle = wrapper.rotateAngle; this.offsetX = wrapper.offsetX; | ||
// this.offsetY = wrapper.offsetY; | ||
container.children.push(wrapper); | ||
} | ||
} | ||
} | ||
this.wrapper = container; | ||
return container; | ||
}; | ||
__decorate([ | ||
Property(null) | ||
], Selector.prototype, "wrapper", void 0); | ||
__decorate([ | ||
Collection([], Node) | ||
], Selector.prototype, "nodes", void 0); | ||
__decorate([ | ||
Collection([], Connector) | ||
], Selector.prototype, "connectors", void 0); | ||
__decorate([ | ||
Property() | ||
], Selector.prototype, "width", void 0); | ||
__decorate([ | ||
Property() | ||
], Selector.prototype, "height", void 0); | ||
__decorate([ | ||
Property(0) | ||
], Selector.prototype, "rotateAngle", void 0); | ||
__decorate([ | ||
Property(0) | ||
], Selector.prototype, "offsetX", void 0); | ||
__decorate([ | ||
Property(0) | ||
], Selector.prototype, "offsetY", void 0); | ||
__decorate([ | ||
Complex({ x: 0.5, y: 0.5 }, Point) | ||
], Selector.prototype, "pivot", void 0); | ||
__decorate([ | ||
Property('CompleteIntersect') | ||
], Selector.prototype, "rubberBandSelectionMode", void 0); | ||
__decorate([ | ||
Collection([], UserHandle) | ||
], Selector.prototype, "userHandles", void 0); | ||
__decorate([ | ||
Property(SelectorConstraints.All) | ||
], Selector.prototype, "constraints", void 0); | ||
__decorate([ | ||
Property() | ||
], Selector.prototype, "setTooltipTemplate", void 0); | ||
return Selector; | ||
}(ChildProperty)); | ||
export { Selector }; |
@@ -10,3 +10,3 @@ import { PointModel } from '../primitives/point-model'; | ||
import { ObjectTypes } from './../enum/enum'; | ||
import { SelectorModel } from './selector-model'; | ||
import { SelectorModel } from '../objects/node-model'; | ||
import { MouseEventArgs } from './event-handlers'; | ||
@@ -13,0 +13,0 @@ import { Actions } from './actions'; |
@@ -7,3 +7,3 @@ import { Container } from '../../core/containers/container'; | ||
import { EventState, ChangeType, State, DiagramAction } from '../../enum/enum'; | ||
import { SelectorModel } from '../../interaction/selector-model'; | ||
import { SelectorModel } from '../../objects/node-model'; | ||
import { DiagramModel } from '../../diagram-model'; | ||
@@ -10,0 +10,0 @@ import { Connector } from '../../objects/connector'; |
@@ -1,2 +0,2 @@ | ||
import { Property, Complex, Collection, ChildProperty, ComplexFactory } from '@syncfusion/ej2-base';import { ShapeStyle, Margin, TextStyle, Shadow } from '../core/appearance';import { ShapeStyleModel, TextStyleModel, ShadowModel, } from '../core/appearance-model';import { Point } from '../primitives/point';import { Size } from '../primitives/size';import { PointModel } from '../primitives/point-model';import { Shapes, BasicShapes, FlowShapes, UmlActivityShapes, Scale, ImageAlignment, Status, ElementAction } from '../enum/enum';import { IElement } from './interface/IElement';import { Container } from '../core/containers/container';import { Canvas } from '../core/containers/canvas';import { getBasicShape } from './dictionary/basic-shapes';import { DiagramElement } from '../core/elements/diagram-element';import { PathElement } from '../core/elements/path-element';import { TextElement } from '../core/elements/text-element';import { ImageElement } from '../core/elements/image-element';import { DiagramNativeElement } from '../core/elements/native-element';import { Port, PointPort } from './port';import { PointPortModel } from './port-model';import { Annotation, ShapeAnnotation } from './annotation';import { ShapeAnnotationModel, HyperlinkModel } from './annotation-model';import { getPortShape, getIconShape } from './dictionary/common';import { getFlowShape } from './dictionary/flow-shapes';import { HorizontalAlignment, VerticalAlignment, BpmnShapes, BpmnEvents, BpmnTriggers, BpmnGateways, NodeConstraints } from '../enum/enum';import { BpmnDataObjects, BpmnTasks, BpmnSubProcessTypes, BpmnLoops } from '../enum/enum';import { BpmnBoundary, BpmnActivities, UmlScope } from '../enum/enum';import { MarginModel } from '../core/appearance-model';import { LayoutModel } from '../layout/layout-base-model';import { checkPortRestriction, setUMLActivityDefaults, getUMLActivityShapes, updatePortEdges } from './../utility/diagram-util';import { setSwimLaneDefaults } from './../utility/diagram-util';import { randomId, getFunction } from './../utility/base-util';import { NodeBase } from './node-base';import { canShadow } from './../utility/constraints-util';import { PortVisibility, Stretch } from '../enum/enum';import { IconShapeModel } from './icon-model';import { IconShape } from './icon';import { measurePath } from './../utility/dom-util';import { Rect } from '../primitives/rect';import { getPolygonPath } from './../utility/path-util';import { DiagramHtmlElement } from '../core/elements/html-element';import { StackPanel } from '../core/containers/stack-panel';import { GridPanel, RowDefinition, ColumnDefinition } from '../core/containers/grid';import { Orientation, ContainerTypes, ClassifierShape } from '../enum/enum';import { getULMClassifierShapes } from '../utility/uml-util';import { initSwimLane } from './../utility/swim-lane-util';import { AnnotationModel } from './annotation-model'; | ||
import { Property, Complex, Collection, ChildProperty, ComplexFactory } from '@syncfusion/ej2-base';import { ShapeStyle, Margin, TextStyle, Shadow } from '../core/appearance';import { ShapeStyleModel, TextStyleModel, ShadowModel, } from '../core/appearance-model';import { Point } from '../primitives/point';import { Size } from '../primitives/size';import { PointModel } from '../primitives/point-model';import { Shapes, BasicShapes, FlowShapes, UmlActivityShapes, Scale, ImageAlignment, Status, ElementAction } from '../enum/enum';import { IElement } from './interface/IElement';import { Container } from '../core/containers/container';import { Canvas } from '../core/containers/canvas';import { getBasicShape } from './dictionary/basic-shapes';import { DiagramElement } from '../core/elements/diagram-element';import { PathElement } from '../core/elements/path-element';import { TextElement } from '../core/elements/text-element';import { ImageElement } from '../core/elements/image-element';import { DiagramNativeElement } from '../core/elements/native-element';import { RubberBandSelectionMode, ThumbsConstraints } from '../enum/enum';import { Port, PointPort } from './port';import { PointPortModel } from './port-model';import { SelectorConstraints } from '../enum/enum';import { Annotation, ShapeAnnotation } from './annotation';import { ShapeAnnotationModel, HyperlinkModel, PathAnnotationModel } from './annotation-model';import { getPortShape, getIconShape } from './dictionary/common';import { getFlowShape } from './dictionary/flow-shapes';import { HorizontalAlignment, VerticalAlignment, BpmnShapes, BpmnEvents, BpmnTriggers, BpmnGateways, NodeConstraints } from '../enum/enum';import { BpmnDataObjects, BpmnTasks, BpmnSubProcessTypes, BpmnLoops } from '../enum/enum';import { BpmnBoundary, BpmnActivities, UmlScope } from '../enum/enum';import { MarginModel } from '../core/appearance-model';import { LayoutModel } from '../layout/layout-base-model';import { checkPortRestriction, setUMLActivityDefaults, getUMLActivityShapes, updatePortEdges } from './../utility/diagram-util';import { setSwimLaneDefaults } from './../utility/diagram-util';import { randomId, getFunction } from './../utility/base-util';import { NodeBase } from './node-base';import { canShadow } from './../utility/constraints-util';import { PortVisibility, Stretch } from '../enum/enum';import { IconShapeModel } from './icon-model';import { IconShape } from './icon';import { measurePath } from './../utility/dom-util';import { Rect } from '../primitives/rect';import { getPolygonPath } from './../utility/path-util';import { DiagramHtmlElement } from '../core/elements/html-element';import { StackPanel } from '../core/containers/stack-panel';import { GridPanel, RowDefinition, ColumnDefinition } from '../core/containers/grid';import { Orientation, ContainerTypes, ClassifierShape } from '../enum/enum';import { getULMClassifierShapes } from '../utility/uml-util';import { initSwimLane } from './../utility/swim-lane-util';import { AnnotationModel } from './annotation-model';import { ConnectorModel } from './connector-model';import { Diagram } from '../../diagram/diagram';import { Connector } from './connector';import { UserHandleModel } from '../interaction/selector-model';import { UserHandle } from '../interaction/selector'; | ||
import {NodeBaseModel} from "./node-base-model"; | ||
@@ -1718,2 +1718,148 @@ | ||
} | ||
/** | ||
* Interface for a class Selector | ||
*/ | ||
export interface SelectorModel { | ||
/** | ||
* Defines the size and position of the container | ||
* @default null | ||
*/ | ||
wrapper?: Container; | ||
/** | ||
* Defines the collection of selected nodes | ||
*/ | ||
nodes?: NodeModel[]; | ||
/** | ||
* Defines the collection of selected connectors | ||
*/ | ||
connectors?: ConnectorModel[]; | ||
/** | ||
* Sets/Gets the width of the container | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
*/ | ||
width?: number; | ||
/** | ||
* Sets/Gets the height of the container | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
*/ | ||
height?: number; | ||
/** | ||
* Sets the rotate angle of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
rotateAngle?: number; | ||
/** | ||
* Sets the positionX of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
offsetX?: number; | ||
/** | ||
* Sets the positionY of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
offsetY?: number; | ||
/** | ||
* Sets the pivot of the selector | ||
* @default { x: 0.5, y: 0.5 } | ||
*/ | ||
pivot?: PointModel; | ||
/** | ||
* Defines how to pick the objects to be selected using rubber band selection | ||
* * CompleteIntersect - Selects the objects that are contained within the selected region | ||
* * PartialIntersect - Selects the objects that are partially intersected with the selected region | ||
* @default 'CompleteIntersect' | ||
*/ | ||
rubberBandSelectionMode?: RubberBandSelectionMode; | ||
/** | ||
* Defines the collection of user handle | ||
* ```html | ||
* <div id='diagram'></div> | ||
* ``` | ||
* ```typescript | ||
* let nodes: NodeModel[] = [{ | ||
* id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100, | ||
* annotations: [{ content: 'Default Shape' }] | ||
* }, | ||
* { | ||
* id: 'node2', width: 100, height: 100, offsetX: 300, offsetY: 100, | ||
* shape: { | ||
* type: 'Basic', shape: 'Ellipse' | ||
* }, | ||
* annotations: [{ content: 'Path Element' }] | ||
* } | ||
* ]; | ||
* let connectors: ConnectorModel[] = [{ | ||
* id: 'connector1', | ||
* type: 'Straight', | ||
* sourcePoint: { x: 100, y: 300 }, | ||
* targetPoint: { x: 200, y: 400 }, | ||
* }]; | ||
* let handle: UserHandleModel[] = [ | ||
* { name: 'handle', margin: { top: 0, bottom: 0, left: 0, right: 0 }, offset: 0, | ||
* pathData: 'M 376.892,225.284L 371.279,211.95L 376.892,198.617L 350.225,211.95L 376.892,225.284 Z', | ||
* side: 'Top', horizontalAlignment: 'Center', verticalAlignment: 'Center', | ||
* pathColor: 'yellow' }]; | ||
* let diagram: Diagram = new Diagram({ | ||
* ... | ||
* connectors: connectors, nodes: nodes, | ||
* selectedItems: { constraints: SelectorConstraints.All, userHandles: handle }, | ||
* ... | ||
* }); | ||
* diagram.appendTo('#diagram'); | ||
* ``` | ||
* @default [] | ||
*/ | ||
userHandles?: UserHandleModel[]; | ||
/** | ||
* Controls the visibility of selector. | ||
* * None - Hides all the selector elements | ||
* * ConnectorSourceThumb - Shows/hides the source thumb of the connector | ||
* * ConnectorTargetThumb - Shows/hides the target thumb of the connector | ||
* * ResizeSouthEast - Shows/hides the bottom right resize handle of the selector | ||
* * ResizeSouthWest - Shows/hides the bottom left resize handle of the selector | ||
* * ResizeNorthEast - Shows/hides the top right resize handle of the selector | ||
* * ResizeNorthWest - Shows/hides the top left resize handle of the selector | ||
* * ResizeEast - Shows/hides the middle right resize handle of the selector | ||
* * ResizeWest - Shows/hides the middle left resize handle of the selector | ||
* * ResizeSouth - Shows/hides the bottom center resize handle of the selector | ||
* * ResizeNorth - Shows/hides the top center resize handle of the selector | ||
* * Rotate - Shows/hides the rotate handle of the selector | ||
* * UserHandles - Shows/hides the user handles of the selector | ||
* * Resize - Shows/hides all resize handles of the selector | ||
* @default 'All' | ||
* @aspNumberEnum | ||
* @blazorNumberEnum | ||
*/ | ||
constraints?: SelectorConstraints; | ||
/** | ||
* setTooltipTemplate helps to customize the content of a tooltip | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
* @deprecated | ||
*/ | ||
setTooltipTemplate?: Function | string; | ||
} |
@@ -10,6 +10,8 @@ /// <reference path="node-base-model.d.ts" /> | ||
import { DiagramElement } from '../core/elements/diagram-element'; | ||
import { RubberBandSelectionMode, ThumbsConstraints } from '../enum/enum'; | ||
import { Port } from './port'; | ||
import { PointPortModel } from './port-model'; | ||
import { SelectorConstraints } from '../enum/enum'; | ||
import { Annotation } from './annotation'; | ||
import { ShapeAnnotationModel } from './annotation-model'; | ||
import { ShapeAnnotationModel, PathAnnotationModel } from './annotation-model'; | ||
import { HorizontalAlignment, VerticalAlignment, BpmnShapes, BpmnEvents, BpmnTriggers, BpmnGateways, NodeConstraints } from '../enum/enum'; | ||
@@ -32,2 +34,5 @@ import { BpmnDataObjects, BpmnTasks, BpmnSubProcessTypes, BpmnLoops } from '../enum/enum'; | ||
import { Orientation, ContainerTypes, ClassifierShape } from '../enum/enum'; | ||
import { ConnectorModel } from './connector-model'; | ||
import { Diagram } from '../../diagram/diagram'; | ||
import { UserHandleModel } from '../interaction/selector-model'; | ||
/** | ||
@@ -1750,1 +1755,158 @@ * Defines the behavior of default shape | ||
} | ||
/** | ||
* Defines the size and position of selected items and defines the appearance of selector | ||
*/ | ||
export declare class Selector extends ChildProperty<Selector> implements IElement { | ||
/** | ||
* Defines the size and position of the container | ||
* @default null | ||
*/ | ||
wrapper: Container; | ||
/** | ||
* Defines the collection of selected nodes | ||
*/ | ||
nodes: NodeModel[]; | ||
/** | ||
* Defines the collection of selected connectors | ||
*/ | ||
connectors: ConnectorModel[]; | ||
/** | ||
* @private | ||
*/ | ||
annotation: ShapeAnnotationModel | PathAnnotationModel; | ||
/** | ||
* Sets/Gets the width of the container | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
*/ | ||
width: number; | ||
/** | ||
* Sets/Gets the height of the container | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
*/ | ||
height: number; | ||
/** | ||
* Sets the rotate angle of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
rotateAngle: number; | ||
/** | ||
* Sets the positionX of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
offsetX: number; | ||
/** | ||
* Sets the positionY of the container | ||
* @default 0 | ||
* @isBlazorNullableType true | ||
*/ | ||
offsetY: number; | ||
/** | ||
* Sets the pivot of the selector | ||
* @default { x: 0.5, y: 0.5 } | ||
*/ | ||
pivot: PointModel; | ||
/** | ||
* Defines how to pick the objects to be selected using rubber band selection | ||
* * CompleteIntersect - Selects the objects that are contained within the selected region | ||
* * PartialIntersect - Selects the objects that are partially intersected with the selected region | ||
* @default 'CompleteIntersect' | ||
*/ | ||
rubberBandSelectionMode: RubberBandSelectionMode; | ||
/** | ||
* Defines the collection of user handle | ||
* ```html | ||
* <div id='diagram'></div> | ||
* ``` | ||
* ```typescript | ||
* let nodes: NodeModel[] = [{ | ||
* id: 'node1', width: 100, height: 100, offsetX: 100, offsetY: 100, | ||
* annotations: [{ content: 'Default Shape' }] | ||
* }, | ||
* { | ||
* id: 'node2', width: 100, height: 100, offsetX: 300, offsetY: 100, | ||
* shape: { | ||
* type: 'Basic', shape: 'Ellipse' | ||
* }, | ||
* annotations: [{ content: 'Path Element' }] | ||
* } | ||
* ]; | ||
* let connectors: ConnectorModel[] = [{ | ||
* id: 'connector1', | ||
* type: 'Straight', | ||
* sourcePoint: { x: 100, y: 300 }, | ||
* targetPoint: { x: 200, y: 400 }, | ||
* }]; | ||
* let handle: UserHandleModel[] = [ | ||
* { name: 'handle', margin: { top: 0, bottom: 0, left: 0, right: 0 }, offset: 0, | ||
* pathData: 'M 376.892,225.284L 371.279,211.95L 376.892,198.617L 350.225,211.95L 376.892,225.284 Z', | ||
* side: 'Top', horizontalAlignment: 'Center', verticalAlignment: 'Center', | ||
* pathColor: 'yellow' }]; | ||
* let diagram: Diagram = new Diagram({ | ||
* ... | ||
* connectors: connectors, nodes: nodes, | ||
* selectedItems: { constraints: SelectorConstraints.All, userHandles: handle }, | ||
* ... | ||
* }); | ||
* diagram.appendTo('#diagram'); | ||
* ``` | ||
* @default [] | ||
*/ | ||
userHandles: UserHandleModel[]; | ||
/** | ||
* Controls the visibility of selector. | ||
* * None - Hides all the selector elements | ||
* * ConnectorSourceThumb - Shows/hides the source thumb of the connector | ||
* * ConnectorTargetThumb - Shows/hides the target thumb of the connector | ||
* * ResizeSouthEast - Shows/hides the bottom right resize handle of the selector | ||
* * ResizeSouthWest - Shows/hides the bottom left resize handle of the selector | ||
* * ResizeNorthEast - Shows/hides the top right resize handle of the selector | ||
* * ResizeNorthWest - Shows/hides the top left resize handle of the selector | ||
* * ResizeEast - Shows/hides the middle right resize handle of the selector | ||
* * ResizeWest - Shows/hides the middle left resize handle of the selector | ||
* * ResizeSouth - Shows/hides the bottom center resize handle of the selector | ||
* * ResizeNorth - Shows/hides the top center resize handle of the selector | ||
* * Rotate - Shows/hides the rotate handle of the selector | ||
* * UserHandles - Shows/hides the user handles of the selector | ||
* * Resize - Shows/hides all resize handles of the selector | ||
* @default 'All' | ||
* @aspNumberEnum | ||
* @blazorNumberEnum | ||
*/ | ||
constraints: SelectorConstraints; | ||
/** | ||
* set the constraint of the container | ||
* * Rotate - Enable Rotate Thumb | ||
* * ConnectorSource - Enable Connector source point | ||
* * ConnectorTarget - Enable Connector target point | ||
* * ResizeNorthEast - Enable ResizeNorthEast Resize | ||
* * ResizeEast - Enable ResizeEast Resize | ||
* * ResizeSouthEast - Enable ResizeSouthEast Resize | ||
* * ResizeSouth - Enable ResizeSouth Resize | ||
* * ResizeSouthWest - Enable ResizeSouthWest Resize | ||
* * ResizeWest - Enable ResizeWest Resize | ||
* * ResizeNorthWest - Enable ResizeNorthWest Resize | ||
* * ResizeNorth - Enable ResizeNorth Resize | ||
* @private | ||
* @aspNumberEnum | ||
* @blazorNumberEnum | ||
*/ | ||
thumbsConstraints: ThumbsConstraints; | ||
/** | ||
* setTooltipTemplate helps to customize the content of a tooltip | ||
* @aspDefaultValueIgnore | ||
* @blazorDefaultValueIgnore | ||
* @default undefined | ||
* @deprecated | ||
*/ | ||
setTooltipTemplate: Function | string; | ||
/** | ||
* Initializes the UI of the container | ||
*/ | ||
init(diagram: Diagram): Container; | ||
} |
@@ -35,2 +35,3 @@ var __extends = (this && this.__extends) || (function () { | ||
import { PointPort } from './port'; | ||
import { SelectorConstraints } from '../enum/enum'; | ||
import { Annotation, ShapeAnnotation } from './annotation'; | ||
@@ -53,2 +54,4 @@ import { getPortShape, getIconShape } from './dictionary/common'; | ||
import { initSwimLane } from './../utility/swim-lane-util'; | ||
import { Connector } from './connector'; | ||
import { UserHandle } from '../interaction/selector'; | ||
var getShapeType = function (obj) { | ||
@@ -1578,1 +1581,90 @@ switch (obj.type) { | ||
export { ChildContainer }; | ||
/** | ||
* Defines the size and position of selected items and defines the appearance of selector | ||
*/ | ||
var Selector = /** @class */ (function (_super) { | ||
__extends(Selector, _super); | ||
function Selector() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
/** | ||
* Initializes the UI of the container | ||
*/ | ||
Selector.prototype.init = function (diagram) { | ||
var container = new Container(); | ||
container.measureChildren = false; | ||
var consize = new Size(); | ||
container.children = []; | ||
if (this.annotation) { | ||
var object = (this.nodes.length > 0) ? diagram.nameTable[this.nodes[0].id].wrapper : | ||
diagram.nameTable[this.connectors[0].id].wrapper; | ||
var wrapper = diagram.getWrapper(object, this.annotation.id); | ||
container.children.push(wrapper); | ||
} | ||
else { | ||
if (this.nodes || this.connectors) { | ||
for (var i = 0; i < this.nodes.length; i++) { | ||
var node = diagram.nameTable[this.nodes[i].id]; | ||
var wrapper = node.wrapper; | ||
// this.width = wrapper.actualSize.width; | ||
// this.height = wrapper.actualSize.height; | ||
// this.rotateAngle = wrapper.rotateAngle; | ||
// this.offsetX = wrapper.offsetX; | ||
// this.offsetY = wrapper.offsetY; | ||
container.children.push(wrapper); | ||
} | ||
for (var j = 0; j < this.connectors.length; j++) { | ||
var connector = diagram.nameTable[this.connectors[j].id]; | ||
var wrapper = connector.wrapper; | ||
// this.width = wrapper.actualSize.width; this.height = wrapper.actualSize.height; | ||
// this.rotateAngle = wrapper.rotateAngle; this.offsetX = wrapper.offsetX; | ||
// this.offsetY = wrapper.offsetY; | ||
container.children.push(wrapper); | ||
} | ||
} | ||
} | ||
this.wrapper = container; | ||
return container; | ||
}; | ||
__decorate([ | ||
Property(null) | ||
], Selector.prototype, "wrapper", void 0); | ||
__decorate([ | ||
Collection([], Node) | ||
], Selector.prototype, "nodes", void 0); | ||
__decorate([ | ||
Collection([], Connector) | ||
], Selector.prototype, "connectors", void 0); | ||
__decorate([ | ||
Property() | ||
], Selector.prototype, "width", void 0); | ||
__decorate([ | ||
Property() | ||
], Selector.prototype, "height", void 0); | ||
__decorate([ | ||
Property(0) | ||
], Selector.prototype, "rotateAngle", void 0); | ||
__decorate([ | ||
Property(0) | ||
], Selector.prototype, "offsetX", void 0); | ||
__decorate([ | ||
Property(0) | ||
], Selector.prototype, "offsetY", void 0); | ||
__decorate([ | ||
Complex({ x: 0.5, y: 0.5 }, Point) | ||
], Selector.prototype, "pivot", void 0); | ||
__decorate([ | ||
Property('CompleteIntersect') | ||
], Selector.prototype, "rubberBandSelectionMode", void 0); | ||
__decorate([ | ||
Collection([], UserHandle) | ||
], Selector.prototype, "userHandles", void 0); | ||
__decorate([ | ||
Property(SelectorConstraints.All) | ||
], Selector.prototype, "constraints", void 0); | ||
__decorate([ | ||
Property() | ||
], Selector.prototype, "setTooltipTemplate", void 0); | ||
return Selector; | ||
}(ChildProperty)); | ||
export { Selector }; |
@@ -6,3 +6,3 @@ import { PointModel } from '../primitives/point-model'; | ||
import { DiagramElement } from '../core/elements/diagram-element'; | ||
import { SelectorModel } from '../interaction/selector-model'; | ||
import { SelectorModel } from '../objects/node-model'; | ||
/** | ||
@@ -9,0 +9,0 @@ * Snapping |
@@ -5,3 +5,3 @@ import { Rect } from '../primitives/rect'; | ||
import { Connector } from './connector'; | ||
import { Selector } from '../interaction/selector'; | ||
import { Selector } from '../objects/node'; | ||
import { getBounds } from './../utility/base-util'; | ||
@@ -8,0 +8,0 @@ import { randomId } from './../utility/base-util'; |
@@ -15,3 +15,3 @@ import { DiagramElement } from '../core/elements/diagram-element'; | ||
import { TransformFactor as Transforms } from '../interaction/scroller'; | ||
import { SelectorModel } from '../interaction/selector-model'; | ||
import { SelectorModel } from '../objects/node-model'; | ||
import { IRenderer } from './../rendering/IRenderer'; | ||
@@ -18,0 +18,0 @@ import { OrthogonalSegment } from '../objects/connector'; |
@@ -8,3 +8,3 @@ import { Diagram } from '../diagram'; | ||
import { PointPortModel } from './../objects/port-model'; | ||
import { SelectorModel } from './../interaction/selector-model'; | ||
import { SelectorModel } from './../objects/node-model'; | ||
/** | ||
@@ -11,0 +11,0 @@ * constraints-util module contains the common constraints |
@@ -5,3 +5,3 @@ import { Node } from './../objects/node'; | ||
import { Connector } from './../objects/connector'; | ||
import { Selector } from './../interaction/selector'; | ||
import { Selector } from './../objects/node'; | ||
import { ShapeAnnotation, PathAnnotation } from '../objects/annotation'; | ||
@@ -8,0 +8,0 @@ /** |
@@ -18,3 +18,4 @@ import { PointModel } from './../primitives/point-model'; | ||
import { Intersection } from './connector'; | ||
import { SelectorModel, UserHandleModel } from '../interaction/selector-model'; | ||
import { SelectorModel } from '../objects/node-model'; | ||
import { UserHandleModel } from '../interaction/selector-model'; | ||
import { PointPortModel } from './../objects/port-model'; | ||
@@ -25,3 +26,3 @@ import { ShapeAnnotationModel, PathAnnotationModel, HyperlinkModel, AnnotationModel } from './../objects/annotation-model'; | ||
import { SymbolPalette } from '../../symbol-palette/symbol-palette'; | ||
import { Selector } from '../interaction/selector'; | ||
import { Selector } from '../objects/node'; | ||
import { Canvas } from '../core/containers/canvas'; | ||
@@ -28,0 +29,0 @@ /** @private */ |
@@ -11,3 +11,3 @@ import { Diagram } from '../diagram'; | ||
import { HistoryEntry } from '../diagram/history'; | ||
import { SelectorModel } from '../interaction/selector-model'; | ||
import { SelectorModel } from '../objects/node-model'; | ||
import { ClipBoardObject } from '../interaction/command-manager'; | ||
@@ -14,0 +14,0 @@ /** |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24932892
183909