Skip to content

Commit eea089b

Browse files
Updated markdwon files
1 parent 1ee4dce commit eea089b

File tree

4 files changed

+37
-14
lines changed

4 files changed

+37
-14
lines changed

apireference/readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#### [PDFKit Plugins](pdfkitplugins.md)
66
* [primitives.pdf.orgdiagram.Plugin](pdfkitplugins.md#primitives.pdf.orgdiagram.Plugin)
77
* [primitives.pdf.famdiagram.Plugin](pdfkitplugins.md#primitives.pdf.famdiagram.Plugin)
8-
#### [Organizational Chart Configuration Objects](orgdiagram.md)
8+
#### [Organizational Chart Configuration](orgdiagram.md)
99
* [Config](orgdiagram.md#primitives.orgdiagram.Config)
1010
* [ItemConfig](orgdiagram.md#primitives.orgdiagram.ItemConfig)
1111
* [TemplateConfig](orgdiagram.md#primitives.orgdiagram.TemplateConfig)
@@ -15,7 +15,7 @@
1515
* [HighlightPathAnnotationConfig](orgdiagram.md#primitives.orgdiagram.HighlightPathAnnotationConfig)
1616
* [ButtonConfig](orgdiagram.md#primitives.orgdiagram.ButtonConfig)
1717
* [EventArgs](orgdiagram.md#primitives.orgdiagram.EventArgs)
18-
#### [Family Diagram Configuration Objects](famdiagram.md)
18+
#### [Family Diagram Configuration](famdiagram.md)
1919
* [Config](famdiagram.md#primitives.famdiagram.Config)
2020
* [ItemConfig](famdiagram.md#primitives.famdiagram.ItemConfig)
2121
* [TemplateConfig](famdiagram.md#primitives.famdiagram.TemplateConfig)

samples/AddingNewItemsToChartAtRuntime.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Please, pay attention to the fact that the chart does not self update it's visua
88

99
The `update` method supports multiple optional parameters which allow you to choose how you want to rerender your diagram.
1010

11-
## In [JavaScript](https://developer.mozilla.org/en-US/docs/Web/javascript):
11+
## In [JavaScript](https://developer.mozilla.org/en-US/docs/Web/javascript)
1212
```Javascript
1313
control.update(primitives.orgdiagram.UpdateMode.Recreate);
1414
```
@@ -25,7 +25,7 @@ control.update(primitives.orgdiagram.UpdateMode.PositonHighlight);
2525
```
2626
It ignores any API changes except current highlight item position, it just positions highlight item, no layout recalculation or items rendering performed.
2727

28-
## In [jQuery](https://jqueryui.com/):
28+
## In [jQuery](https://jqueryui.com/)
2929
```Javascript
3030
jQuery("#basicdiagram").orgDiagram(`update`, primitives.orgdiagram.UpdateMode.Recreate); /* Recreate */
3131
jQuery("#placeholder").orgDiagram(`update`, primitives.orgdiagram.UpdateMode.Refresh); /* Refresh */

samples/FirstOrganizationalChart.md

+30-7
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ The following is the minimal set of files needed to use Basic Primitives compone
1616
The controls are state-full that means they keep internal state of the diagrams in order to minimize updates of visuals and avoid unnecessarily layout calculations. Library has two methods to construct instances of controls: use primitives.orgdiagram.Control for Organizational Diagrams and primitives.famdiagram.Control for Family Diagrams creation. The following code snippet creates organization chart inside empty div having "basicdiagram" id:
1717

1818
```Javascript
19-
var control = primitives.orgdiagram.Control(document.getElementById("basicdiagram"), {
20-
/* regular JSON object or instance of primitives.orgdiagram.Config class*/
19+
var control = primitives.orgdiagram.Control(
20+
document.getElementById("basicdiagram"), {
21+
/* regular JSON object or instance of
22+
primitives.orgdiagram.Config class
23+
*/
2124
});
2225
```
2326

@@ -80,7 +83,7 @@ Historically Basic Primitives provides jQuery UI Widgets wrapping core controls,
8083
Basic Primitives jQuery UI widgets are added as methods on jQuery object, so for example in order to create a new organization chart inside empty div having "basicdiagram" id, we have to call following jQuery method:
8184

8285
```Javascript
83-
jQuery("#basicdiagram").orgDiagram({/* here is we define items & configuration options for our chart*/});
86+
jQuery("#basicdiagram").orgDiagram({/* new primitives.orgdiagram.Config() */});
8487
```
8588
In order to get configuration object of existing widget call its method with argument "option"
8689

@@ -110,9 +113,27 @@ In order to define the same chart as JSON object, replace it with the following
110113
```Javascript
111114
jQuery("#basicdiagram").orgDiagram({
112115
items: [
113-
{ id: 0, parent: null, title: "Scott Aasrud", description: "VP, Public Sector", image: "demo/images/photos/a.png" },
114-
{ id: 1, parent: 0, title: "Ted Lucas", description: "VP, Human Resources", image: "demo/images/photos/b.png" },
115-
{ id: 2, parent: 0, title: "Joao Stuger", description: "Business Solutions, US", image: "demo/images/photos/c.png"}
116+
{
117+
id: 0,
118+
parent: null,
119+
title: "Scott Aasrud",
120+
description: "VP, Public Sector",
121+
image: "demo/images/photos/a.png"
122+
},
123+
{
124+
id: 1,
125+
parent: 0,
126+
title: "Ted Lucas",
127+
description: "VP, Human Resources",
128+
image: "demo/images/photos/b.png"
129+
},
130+
{
131+
id: 2,
132+
parent: 0,
133+
title: "Joao Stuger",
134+
description: "Business Solutions, US",
135+
image: "demo/images/photos/c.png"
136+
}
116137
],
117138
cursorItem: 0,
118139
hasSelectorCheckbox: primitives.common.Enabled.True
@@ -200,7 +221,9 @@ var sampleSize = samfirstOrganizationalChartSampleple3.getSize();
200221
`getSize` method returns diagram size, so we can create new PDF document big enough to accomodate our diagram:
201222

202223
```JavaScript
203-
var doc = new PDFDocument({ size: [sampleSize.width + 100, sampleSize.height + 150] });
224+
var doc = new PDFDocument({
225+
size: [sampleSize.width + 100, sampleSize.height + 150]
226+
});
204227
```
205228

206229
Plugin draws diagram in current PDFkit document layout transformation context, so developer can rotate, translate and scale diagrams on PDFkit document page.

src.primitives/Controls/OrgDiagram/Configs/Config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ primitives.orgdiagram.Config = function (name) {
161161
this.items = [];
162162

163163
/**
164-
* Annotations. Annotations are API elements that are attached to the diagram nodes.
165-
* We draw our annotations either in front of the nodes or in the background. The annotations
166-
* don't affect the nodes placement in any way. As a result the control redraws them
164+
* Annotations. Annotations are API elements that are attached to the diagram nodes positions.
165+
* We draw annotations either in front of the diagram nodes or in their background. Annotations
166+
* don't affect nodes placement in any way. As a result the control redraws them
167167
* instantaneously without rerendering or recalculating the actual diagram layout.
168168
*
169169
* @type {Array.<(ShapeAnnotationConfig | BackgroundAnnotationConfig | ConnectorAnnotationConfig | HighlightPathAnnotationConfig)>}

0 commit comments

Comments
 (0)