Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-diagrams

Package Overview
Dependencies
Maintainers
2
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-diagrams - npm Package Compare versions

Comparing version 16.4.44 to 16.4.46

9

CHANGELOG.md

@@ -9,2 +9,11 @@ # Changelog

- Performance has been improved when dragging more number of nodes and connectors.
- Issue on applying style for connector’s annotation is now fixed.
## 16.4.44 (2018-12-24)
### Diagram
#### Bug Fixes
- Alignment issue on complex hierarchical tree layout with complex data source is working fine.

@@ -11,0 +20,0 @@

2

dist/global/index.d.ts
/*!
* filename: index.d.ts
* version : 16.4.44
* version : 16.4.46
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-diagrams",
"version": "16.4.44",
"version": "16.4.46",
"description": "Feature-rich diagram control to create diagrams like flow charts, organizational charts, mind maps, and BPMN diagrams. Its rich feature set includes built-in shapes, editing, serializing, exporting, printing, overview, data binding, and automatic layouts.",

@@ -12,6 +12,6 @@ "author": "Syncfusion Inc.",

"@syncfusion/ej2-base": "~16.4.42",
"@syncfusion/ej2-data": "~16.4.42",
"@syncfusion/ej2-navigations": "~16.4.44",
"@syncfusion/ej2-inputs": "~16.4.44",
"@syncfusion/ej2-popups": "~16.4.44",
"@syncfusion/ej2-data": "~16.4.45",
"@syncfusion/ej2-navigations": "~16.4.45",
"@syncfusion/ej2-inputs": "~16.4.46",
"@syncfusion/ej2-popups": "~16.4.45",
"@syncfusion/ej2-buttons": "~16.4.42",

@@ -18,0 +18,0 @@ "@syncfusion/ej2-lists": "~16.4.44"

@@ -39,2 +39,7 @@ import { HorizontalAlignment, VerticalAlignment, UnitMode, Transform, RelativeMode } from '../../enum/enum';

/**
* Check whether style need to be apply or not
*/
/** @private */
canApplyStyle: boolean;
/**
* Sets or gets whether the content of the element to be visible

@@ -41,0 +46,0 @@ */

@@ -35,2 +35,7 @@ import { Transform } from '../../enum/enum';

/**
* Check whether style need to be apply or not
*/
/** @private */
this.canApplyStyle = true;
/**
* Sets or gets whether the content of the element to be visible

@@ -37,0 +42,0 @@ */

@@ -1,2 +0,2 @@

import { Component, Property, Complex, Collection, EventHandler, L10n, Droppable, remove, Ajax } from '@syncfusion/ej2-base';import { Browser, ModuleDeclaration, Event, EmitType } from '@syncfusion/ej2-base';import { INotifyPropertyChanged } 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 { IDragEnterEventArgs, IDragLeaveEventArgs, IDragOverEventArgs, IDropEventArgs } from './objects/interface/IElement';import { ITextEditEventArgs, IHistoryChangeArgs, IScrollChangeEventArgs, IMouseEventArgs } from './objects/interface/IElement';import { StackEntryObject } 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 { 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 } from './objects/node-model';import { UmlActivityShapeModel, SwimLaneModel, LaneModel } from './objects/node-model';import { Size } from './primitives/size';import { Point } from './primitives/point';import { Keys, KeyModifiers, DiagramTools, AlignmentMode, AnnotationConstraints, NodeConstraints } 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 } 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 { 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 } 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 } 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 } 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 } 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 } from './interaction/container-interaction';import { DataManager } from '@syncfusion/ej2-data';import { ContextMenuItemModel } from './../diagram/objects/interface/interfaces';
import { Component, Property, Complex, Collection, EventHandler, L10n, Droppable, remove, Ajax } from '@syncfusion/ej2-base';import { Browser, ModuleDeclaration, Event, EmitType } from '@syncfusion/ej2-base';import { INotifyPropertyChanged } 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 { IDragEnterEventArgs, IDragLeaveEventArgs, IDragOverEventArgs, IDropEventArgs } from './objects/interface/IElement';import { ITextEditEventArgs, IHistoryChangeArgs, IScrollChangeEventArgs, IMouseEventArgs } from './objects/interface/IElement';import { StackEntryObject } 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 { 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 } from './objects/node-model';import { UmlActivityShapeModel, SwimLaneModel, LaneModel } from './objects/node-model';import { Size } from './primitives/size';import { Point } from './primitives/point';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 } 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 { 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 } 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 } 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 } 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 } 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 } from './interaction/container-interaction';import { DataManager } from '@syncfusion/ej2-data';import { ContextMenuItemModel } from './../diagram/objects/interface/interfaces';
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -3,0 +3,0 @@

@@ -696,3 +696,21 @@ /**

DiagramAction[DiagramAction["Clear"] = 128] = "Clear";
/** prevents diagram from clear selection. */
DiagramAction[DiagramAction["PreventClearSelection"] = 256] = "PreventClearSelection";
/** Indicates whether drag or rotate tool has been activated */
DiagramAction[DiagramAction["Interactions"] = 512] = "Interactions";
})(DiagramAction || (DiagramAction = {}));
/**
* Defines the Selector type to be drawn
* None - Draws Normal selector with resize handles
* Symbol - Draws only the rectangle for the selector
*/
export var RendererAction;
(function (RendererAction) {
/** None - Draws Normal selector with resize handles */
RendererAction[RendererAction["None"] = 2] = "None";
/** DrawSelectorBorder - Draws only the Border for the selector */
RendererAction[RendererAction["DrawSelectorBorder"] = 4] = "DrawSelectorBorder";
/** PreventRenderSelector - Avoid the render of selector during interaction */
RendererAction[RendererAction["PreventRenderSelector"] = 8] = "PreventRenderSelector";
})(RendererAction || (RendererAction = {}));
export var RealAction;

@@ -699,0 +717,0 @@ (function (RealAction) {

@@ -51,6 +51,2 @@ import { Connector } from '../objects/connector';

}
//Panning
if (canZoomPan(diagram) && !obj) {
return 'Pan';
}
if (hasSelection(diagram)) {

@@ -113,2 +109,6 @@ var element = (diagram.selectedItems.annotation) ?

}
//Panning
if (canZoomPan(diagram) && !obj) {
return 'Pan';
}
if (target instanceof PointPort && (!canZoomPan(diagram))) {

@@ -115,0 +115,0 @@ var action = findPortToolToActivate(diagram, target);

@@ -575,3 +575,3 @@ /// <reference path="node-base-model.d.ts" />

/** @private */
updateAnnotation(annotation: PathAnnotation, points: PointModel[], bounds: Rect, textElement: TextElement | DiagramHtmlElement): void;
updateAnnotation(annotation: PathAnnotation, points: PointModel[], bounds: Rect, textElement: TextElement | DiagramHtmlElement, canRefresh?: number): void;
/** @private */

@@ -578,0 +578,0 @@ getConnectorPoints(type: Segments, points?: PointModel[], layoutOrientation?: LayoutOrientation): PointModel[];

@@ -775,3 +775,3 @@ var __extends = (this && this.__extends) || (function () {

}
// textele.style = annotation.style;
textele.style = annotation.style;
// tslint:disable-next-line:no-any

@@ -788,3 +788,3 @@ var wrapperContent;

/** @private */
Connector.prototype.updateAnnotation = function (annotation, points, bounds, textElement) {
Connector.prototype.updateAnnotation = function (annotation, points, bounds, textElement, canRefresh) {
var getPointloop;

@@ -797,3 +797,3 @@ var newPoint;

var pivotPoint = { x: 0, y: 0 };
if (!(textElement instanceof DiagramHtmlElement)) {
if (!(textElement instanceof DiagramHtmlElement) && (!canRefresh)) {
textElement.refreshTextElement();

@@ -800,0 +800,0 @@ }

@@ -1411,3 +1411,3 @@ /// <reference path="node-base-model.d.ts" />

/** @private */
initAnnotationWrapper(annotation: Annotation, diagramId?: string, virtualize?: boolean): DiagramElement;
initAnnotationWrapper(annotation: Annotation, diagramId?: string, virtualize?: boolean, value?: number): DiagramElement;
private initIconContainer;

@@ -1414,0 +1414,0 @@ private initIconSymbol;

@@ -991,3 +991,3 @@ var __extends = (this && this.__extends) || (function () {

for (var i = 0; this.annotations !== undefined, i < this.annotations.length; i++) {
annotation = this.initAnnotationWrapper(this.annotations[i], diagramId, virtualize);
annotation = this.initAnnotationWrapper(this.annotations[i], diagramId, virtualize, i);
// tslint:disable-next-line:no-any

@@ -1031,4 +1031,4 @@ var wrapperContent = void 0;

/** @private */
Node.prototype.initAnnotationWrapper = function (annotation, diagramId, virtualize) {
annotation.id = annotation.id || randomId();
Node.prototype.initAnnotationWrapper = function (annotation, diagramId, virtualize, value) {
annotation.id = annotation.id || value + 'annotation' || randomId();
var label = annotation;

@@ -1035,0 +1035,0 @@ var annotationcontent;

@@ -30,2 +30,3 @@ import { ShadowModel, GradientModel } from '../core/appearance-model';

description?: string;
canApplyStyle?: boolean;
}

@@ -32,0 +33,0 @@ /** @private */

@@ -12,2 +12,3 @@ import { DiagramElement } from '../core/elements/diagram-element';

import { RectAttributes, BaseAttributes } from './canvas-interface';
import { RendererAction } from '../enum/enum';
import { ThumbsConstraints, SelectorConstraints } from '../enum/enum';

@@ -36,2 +37,4 @@ import { TransformFactor as Transforms } from '../interaction/scroller';

adornerSvgLayer: SVGSVGElement;
/** @private */
rendererActions: RendererAction;
private element;

@@ -38,0 +41,0 @@ private transform;

@@ -20,2 +20,3 @@ import { PathElement } from '../core/elements/path-element';

import { Point } from '../primitives/point';
import { avoidDrawSelector } from '../utility/constraints-util';
/**

@@ -122,3 +123,5 @@ * Renderer module is used to render basic diagram elements

DiagramRenderer.prototype.renderElement = function (element, canvas, htmlLayer, transform, parentSvg, createParent, fromPalette, indexValue) {
var isElement = true;
if (element instanceof Container) {
isElement = false;
this.renderContainer(element, canvas, htmlLayer, transform, parentSvg, createParent, fromPalette, indexValue);

@@ -144,2 +147,5 @@ }

}
if (isElement) {
element.canApplyStyle = false;
}
};

@@ -250,3 +256,3 @@ /** @private */

var width = element.actualSize.width;
if (constraints & ThumbsConstraints.Rotate) {
if (constraints & ThumbsConstraints.Rotate && (!avoidDrawSelector(this.rendererActions))) {
this.renderPivotLine(element, canvas, transform, selectorConstraints, canMask);

@@ -258,3 +264,3 @@ this.renderRotateThumb(element, canvas, transform, selectorConstraints, canMask);

var nodeHeight = element.actualSize.height * currentZoom;
if (!nodeConstraints) {
if (!nodeConstraints && (!avoidDrawSelector(this.rendererActions))) {
if (nodeWidth >= 40 && nodeHeight >= 40) {

@@ -989,2 +995,3 @@ //Hide corners when the size is less than 40

gradient: element.style.gradient, visible: element.visible, id: element.id, description: element.description,
canApplyStyle: element.canApplyStyle
};

@@ -991,0 +998,0 @@ if (transform) {

@@ -532,33 +532,35 @@ import { Point } from './../primitives/point';

SvgRenderer.prototype.setSvgStyle = function (svg, style, diagramId) {
if (style.fill === 'none') {
style.fill = 'transparent';
if (style.canApplyStyle || style.canApplyStyle === undefined) {
if (style.fill === 'none') {
style.fill = 'transparent';
}
if (style.stroke === 'none') {
style.stroke = 'transparent';
}
var dashArray = [];
var fill = void 0;
if (style.dashArray !== undefined) {
var canvasRenderer = new CanvasRenderer();
dashArray = canvasRenderer.parseDashArray(style.dashArray);
}
if (style.gradient && style.gradient.type !== 'None') {
var grd = this.renderGradient(style, svg, diagramId);
fill = 'url(#' + grd.id + ')';
}
else {
fill = style.fill;
}
if (style.stroke) {
svg.setAttribute('stroke', style.stroke);
}
if (style.strokeWidth !== undefined && style.strokeWidth !== null) {
svg.setAttribute('stroke-width', style.strokeWidth.toString());
}
if (dashArray) {
svg.setAttribute('stroke-dasharray', dashArray.toString());
}
if (fill) {
svg.setAttribute('fill', fill);
}
}
if (style.stroke === 'none') {
style.stroke = 'transparent';
}
var dashArray = [];
var fill;
if (style.dashArray !== undefined) {
var canvasRenderer = new CanvasRenderer();
dashArray = canvasRenderer.parseDashArray(style.dashArray);
}
if (style.gradient && style.gradient.type !== 'None') {
var grd = this.renderGradient(style, svg, diagramId);
fill = 'url(#' + grd.id + ')';
}
else {
fill = style.fill;
}
if (style.stroke) {
svg.setAttribute('stroke', style.stroke);
}
if (style.strokeWidth !== undefined && style.strokeWidth !== null) {
svg.setAttribute('stroke-width', style.strokeWidth.toString());
}
if (dashArray) {
svg.setAttribute('stroke-dasharray', dashArray.toString());
}
if (fill) {
svg.setAttribute('fill', fill);
}
};

@@ -565,0 +567,0 @@ //end region

import { Diagram } from '../diagram';
import { NodeModel } from './../objects/node-model';
import { ConnectorModel } from './../objects/connector-model';
import { RendererAction } from '../enum/enum';
import { Connector } from './../objects/connector';

@@ -81,1 +82,3 @@ import { AnnotationModel, PathAnnotationModel, ShapeAnnotationModel } from './../objects/annotation-model';

export declare function canDrag(port: PointPortModel | NodeModel, diagram: Diagram): number;
/** @private */
export declare function avoidDrawSelector(rendererActions: RendererAction): boolean;
import { Node } from './../objects/node';
import { NodeConstraints, ConnectorConstraints, DiagramConstraints, DiagramTools, DiagramAction } from '../enum/enum';
import { NodeConstraints, ConnectorConstraints, DiagramConstraints, DiagramTools, DiagramAction, RendererAction } from '../enum/enum';
import { AnnotationConstraints, PortConstraints } from '../enum/enum';

@@ -294,1 +294,10 @@ import { Connector } from './../objects/connector';

}
/** @private */
export function avoidDrawSelector(rendererActions) {
if ((rendererActions & RendererAction.PreventRenderSelector)) {
return true;
}
else {
return false;
}
}

@@ -600,2 +600,3 @@ import { Size } from './../primitives/size';

var textElement = target;
target.canApplyStyle = true;
for (var _i = 0, _a = Object.keys(changedObject); _i < _a.length; _i++) {

@@ -602,0 +603,0 @@ var key = _a[_i];

@@ -996,2 +996,3 @@ var __extends = (this && this.__extends) || (function () {

dragStart: this.dragStart,
preventDefault: false,
dragStop: this.dragStop,

@@ -998,0 +999,0 @@ drag: function (args) {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc