Skip to content

Commit

Permalink
Release 19.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Schelkunov (DevExpress) committed Jun 20, 2019
1 parent 1fa5c95 commit 7f37551
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 3 deletions.
5 changes: 5 additions & 0 deletions js/docEnums.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,3 +1031,8 @@
* @typedef {string} Enums.DiagramAutoLayout
* @enum {'tree'|'sugiyama'}
*/

/**
* @typedef {string} Enums.DiagramConnectionPointSide
* @enum {'north'|'east'|'south'|'west'}
*/
66 changes: 66 additions & 0 deletions js/ui/diagram/ui.diagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const DIAGRAM_ITEMS_FIELD = "items";
const DIAGRAM_FROM_FIELD = "from";
const DIAGRAM_TO_FIELD = "to";

const DIAGRAM_CONNECTION_POINT_SIDES = ["north", "east", "south", "west"];

class Diagram extends Widget {
_init() {
this._updateDiagramLockCount = 0;
Expand Down Expand Up @@ -372,9 +374,21 @@ class Diagram extends Widget {
id: s.id,
title: s.title,
svgUrl: s.svgUrl,
svgLeft: s.svgLeft,
svgTop: s.svgTop,
svgWidth: s.svgWidth,
svgHeight: s.svgHeight,
defaultWidth: s.defaultWidth,
defaultHeight: s.defaultHeight,
defaultText: s.defaultText,
allowHasText: s.allowHasText,
textLeft: s.textLeft,
textTop: s.textTop,
textWidth: s.textWidth,
textHeight: s.textHeight,
connectionPoints: s.connectionPoints && s.connectionPoints.map(pt => {
return { 'x': pt.x, 'y': pt.y, 'side': DIAGRAM_CONNECTION_POINT_SIDES.indexOf(pt.side) };
})
};
}
));
Expand Down Expand Up @@ -623,6 +637,22 @@ class Diagram extends Widget {
* @type String
*/
/**
* @name dxDiagramOptions.customShapes.svgLeft
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.svgTop
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.svgWidth
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.svgHeight
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.defaultWidth
* @type Number
*/
Expand All @@ -631,9 +661,45 @@ class Diagram extends Widget {
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.defaultText
* @type String
*/
/**
* @name dxDiagramOptions.customShapes.allowHasText
* @type Boolean
*/
/**
* @name dxDiagramOptions.customShapes.textLeft
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.textTop
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.textWidth
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.textHeight
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.connectionPoints
* @type Array<Object>
*/
/**
* @name dxDiagramOptions.customShapes.connectionPoints.x
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.connectionPoints.y
* @type Number
*/
/**
* @name dxDiagramOptions.customShapes.connectionPoints.side
* @type Enums.DiagramConnectionPointSide
*/
],
/**
* @name dxDiagramOptions.export
Expand Down
7 changes: 6 additions & 1 deletion js/ui/speed_dial_action/speed_dial_action.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Guid from "../../core/guid";
import readyCallbacks from "../../core/utils/ready_callbacks";
import Widget from "../widget/ui.widget";
import { initAction, disposeAction } from "./speed_dial_main_item";
import { getSwatchContainer } from "../widget/swatch_container";

const ready = readyCallbacks.add;

Expand Down Expand Up @@ -103,7 +104,11 @@ const SpeedDialAction = Widget.inherit({
},

_render() {
ready(() => initAction(this));
if(!getSwatchContainer(this.$element())) {
ready(() => initAction(this));
} else {
initAction(this);
}
},

_dispose() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"license": "SEE LICENSE IN README.md",
"dependencies": {
"devexpress-diagram": "0.0.25",
"devexpress-diagram": "0.0.26",
"jszip": "^2.0.0 || ^3.0.0",
"quill": "^1.3.6",
"showdown": "^1.8.6",
Expand Down
2 changes: 1 addition & 1 deletion ts/dx.all.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ declare module DevExpress.ui {
/** @name dxDiagram.Options */
export interface dxDiagramOptions extends WidgetOptions<dxDiagram> {
/** @name dxDiagram.Options.customShapes */
customShapes?: Array<{ allowHasText?: boolean, defaultHeight?: number, defaultWidth?: number, id?: number, svgUrl?: string, title?: string }>;
customShapes?: Array<{ allowHasText?: boolean, connectionPoints?: Array<{ side?: 'north' | 'east' | 'south' | 'west', x?: number, y?: number }>, defaultHeight?: number, defaultText?: string, defaultWidth?: number, id?: number, svgHeight?: number, svgLeft?: number, svgTop?: number, svgUrl?: string, svgWidth?: number, textHeight?: number, textLeft?: number, textTop?: number, textWidth?: number, title?: string }>;
/** @name dxDiagram.Options.edges */
edges?: { dataSource?: Array<any> | DevExpress.data.DataSource | DevExpress.data.DataSourceOptions, fromExpr?: string | ((data: any) => any), keyExpr?: string | ((data: any) => any), toExpr?: string | ((data: any) => any) };
/** @name dxDiagram.Options.export */
Expand Down

0 comments on commit 7f37551

Please sign in to comment.