Skip to content

Commit 50e305e

Browse files
Updated api reference
1 parent 83a27df commit 50e305e

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

apireference/orgdiagram.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ Organizational Chart configuration object. Use this object as a reference for av
9292
| `normalLevelShift` | number | `20` | Sets the spacing between rows. |
9393
| `orientationType` | OrientationType | `0` | Set diagram orientation. This option controls diagram layout orientation. The control can be rotated in any direction, this is needed for Arabic support and various layouts. |
9494
| `pageFitMode` | PageFitMode | `3` | Page fit mode. Minimizing nodes into markers and labels. This option provides a special mode that renders the diagram nodes in the form of markers. This is a highly scalable form that is capable of rendering large numbers of nodes while not affecting the rendering performance. With this, huge diagrams can be fit into avaialable screen space. When using a graphics editor to manually draw your diagrams, it is common place to have large gaps between the nodes. This can make the diagram/chart unreadable, hard to edit and navigate. On top of that, on a large scale the diagram could have screen size intervals between items. Admittedly the computer UI does allow the user to scale and fit the diagram in order to visualize it on a single screen. But in that case, the items become small and unreadable as there is no scaling priority and the items are just too small to be readable. |
95+
| `placeAdvisersAboveChildren` | boolean | `true` | Sets default placement of advisers hierarchies relative to the regular children of the parent node. If adviser node has its own children then control adds extra levels, so advisers children are placed above level of the parent node children. |
96+
| `placeAssistantsAboveChildren` | boolean | `true` | Sets default placement of assistants hierarchies relative to the regular children of the parent node. If assitant node has its own children then control adds extra levels, so assistants children are placed above level of the parent node children. |
9597
| `scale` | number | `1` | CSS3 scale transform. Control supports content scaling using CSS scale transform. It scales everything except scroll bars. It properly handles mouse event coordinates. The CSS scale transform produces unreadable text and corrupted lines in desktop browsers, it looks good only in mobile browsers, so our recomendation is to use zoom with collection of item templates of various sizes. Templates gives you better control over quality of your content at various zoom levels. |
9698
| `selectCheckBoxLabel` | string | `"Selected"` | Selection check box label. See `hasSelectorCheckbox` and `selectedItems` properties. |
9799
| `selectedItems` | string[] | `[]` | Selected items collection. Selected items is a collection of items ids having checked their check boxes. The control always shows selected items in the full size form, regardless of enabled page fit mode. The control notifies about user made changes in this collection with `onSelectionChanging` and `onSelectionChanged` events. |
@@ -144,8 +146,11 @@ Item Configuration Object defines properties of individual node in the organizat
144146
| `labelOrientation` | TextOrientationType | `3` | Label orientation. If `Auto` then it is set to `labelOrientation` property of the control configuration. |
145147
| `labelPlacement` | PlacementType | `0` | Label placement. Sets label placement relative to the marker bounding rectangle. If `Auto` then it is set to `labelPlacement` of the control configuration. |
146148
| `labelSize` | Size | `null` | Label size. Sets label's placeholder `div` size and controls conflict resolution if labels overlap each other. If `null` then it is set to `labelSize` property of the control configuration. |
149+
| `levelOffset` | number | `null` | Sets node level offset relative to parent node. This property is ignored if it is not applicable. |
147150
| `minimizedItemShapeType` | ShapeType | `null` | Marker type. The shape of the marker when node is minimized by autofit. The control supports auto fit of diagram into available screen space. When diagram size significantly larger than available screen space, its scrolling and navigation becomes problematic, so control supports automatic diagram fit into the screen space via rendering some of its nodes in form of small markers. So this option sets marker shape for individual node. |
148151
| `parent` | string | `null` | Parent item id. If `null` then node is the root item of the hierarchy. |
152+
| `placeAdvisersAboveChildren` | Enabled | `0` | Sets default placement of advisers hierarchies relative to the regular children of the node. If adviser node has its own children then control adds extra levels, so advisers children are placed above level of the regular children. |
153+
| `placeAssistantsAboveChildren` | Enabled | `0` | Sets default placement of assistants hierarchies relative to the regular children of the node. If assitant node has its own children then control adds extra levels, so assistants children are placed above level of the regular children. |
149154
| `showCallout` | Enabled | `0` | Sets callout annotation visibility for individual node. The callout annotation is one of easy to use features of the control. By default it is displayed for markers in order to preview their node's content. The content is displayed using current template of the node it is rendered for. The callout can be forced to be displayed for regular nodes as well. In that case use `calloutTemplateName` property to change their template. Auto - depends on `showCallout` property of the control True - shown regardless of node's visibility False - hidden |
150155
| `showLabel` | Enabled | `0` | Sets label visibility for individual nodes. Labels are only rendered for a node's markers. The control does not preserve space for labels in the diagram layout, since that would contradict the purpose of minimizing the nodes into markers. Use controls `dotLevelShift`, `dotItemsInterval` properties to preserve space between nodes for labels. Labels are displayed inside of `div`s of the fixed size, see `labelSize` property, and control provides simple conflict resoltion to avoid labels overlapping. If two labels overlap each other with their bounding rectangles then only one of them is going to stay visible. Auto - displays label only when it has space to be rendered. True - shows label regardless, even if it overlaps other labels and nodes. False - hidden. |
151156
| `templateName` | string | `null` | Template name. Templates are HTML fragments containing layout and styles used to render diagram nodes. They are defined with a named configuration objects. See `templates` property of control's configuration object. This option lets individually assign rendering template per individual node of the diagram. |

src.primitives/Controls/OrgDiagram/Tasks/Transformations/VisualTreeTask.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ primitives.orgdiagram.VisualTreeTask = function (orgTreeTask, activeItemsTask, v
4444
leftSiblingIndex,
4545
rightSiblingIndex,
4646
index, len,
47+
item,
4748
childIndex,
4849
childrenLen,
4950
depth,
@@ -181,7 +182,7 @@ primitives.orgdiagram.VisualTreeTask = function (orgTreeTask, activeItemsTask, v
181182
visualTree.add(shiftParent.id, treeItem.id, treeItem);
182183
treeItem = shiftParent;//ignore jslint
183184
case primitives.orgdiagram.ItemType.Assistant://ignore jslint
184-
var parent = createNewVisualAggregatorWithGivenDepth(visualTree, logicalParentItem, false, false, orgItem.levelOffset || 0)
185+
var parent = createNewVisualAggregatorWithGivenDepth(visualTree, logicalParentItem, false, false, orgItem.levelOffset || 0);
185186
switch (orgItem.adviserPlacementType) {
186187
case primitives.common.AdviserPlacementType.Left:
187188
visualTree.add(parent.id, treeItem.id, treeItem, 0);
@@ -284,12 +285,12 @@ primitives.orgdiagram.VisualTreeTask = function (orgTreeTask, activeItemsTask, v
284285

285286
var aggregators = [];
286287
if (regularChildrenLevels.length > 0) {
287-
var visualParent = getLastVisualAggregator(visualTree, logicalParentItem);
288+
visualParent = getLastVisualAggregator(visualTree, logicalParentItem);
288289
for (var indexLevel = 0; indexLevel < regularChildrenLevels.length - 1; indexLevel += 1) {
289290
var regularChildrenLevel = regularChildrenLevels[indexLevel];
290291
if (regularChildrenLevel != null) {
291292
var hideChildConnector = (logicalParentItem.visibility == primitives.common.Visibility.Invisible) && (logicalParentItem.connectorPlacement === 0);
292-
nextVisualParent = createNewVisualAggregator(visualTree, visualParent, hideChildConnector);
293+
var nextVisualParent = createNewVisualAggregator(visualTree, visualParent, hideChildConnector);
293294

294295
aggregators.push([nextVisualParent]);
295296

@@ -308,14 +309,14 @@ primitives.orgdiagram.VisualTreeTask = function (orgTreeTask, activeItemsTask, v
308309
}
309310

310311
for (index = medianIndex; index >= 0; index -= 1) {
311-
var item = regularChildrenLevel[index];
312+
item = regularChildrenLevel[index];
312313
visualTree.add(visualParent.id, item.id, item, 0);
313314
item.connectorPlacement = primitives.common.SideFlag.Top | primitives.common.SideFlag.Bottom;
314315
item.gravity = primitives.common.HorizontalAlignmentType.Right;
315316
}
316317

317318
for (index = medianIndex + 1; index < regularChildrenLevel.length; index += 1) {
318-
var item = regularChildrenLevel[index];
319+
item = regularChildrenLevel[index];
319320
visualTree.add(visualParent.id, item.id, item);
320321
item.connectorPlacement = primitives.common.SideFlag.Top | primitives.common.SideFlag.Bottom;
321322
item.gravity = primitives.common.HorizontalAlignmentType.Left;
@@ -356,7 +357,7 @@ primitives.orgdiagram.VisualTreeTask = function (orgTreeTask, activeItemsTask, v
356357
}
357358
break;
358359
case primitives.common.Enabled.True:
359-
extendChildren = true
360+
extendChildren = true;
360361
break;
361362
}
362363

@@ -384,7 +385,7 @@ primitives.orgdiagram.VisualTreeTask = function (orgTreeTask, activeItemsTask, v
384385
}
385386
break;
386387
case primitives.common.Enabled.True:
387-
extendChildren = true
388+
extendChildren = true;
388389
break;
389390
}
390391
if (extendChildren) {
@@ -845,8 +846,8 @@ primitives.orgdiagram.VisualTreeTask = function (orgTreeTask, activeItemsTask, v
845846

846847
function createNewVisualAggregatorWithGivenDepth(visualTree, treeItem, hideParentConnector, hideChildrenConnector, depth) {
847848
var result = null,
848-
newAggregatorItem,
849-
hideParentConnector = hideParentConnector || hideChildrenConnector;
849+
newAggregatorItem;
850+
hideParentConnector = hideParentConnector || hideChildrenConnector;
850851

851852
var index = 0;
852853
while (index <= depth) {

0 commit comments

Comments
 (0)