@balkangraph/orgchart.js 8.15.11 → 8.15.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/orgchart.d.ts +47 -3
- package/orgchart.js +1 -1
- package/package.json +1 -1
package/orgchart.d.ts
CHANGED
|
@@ -3225,23 +3225,67 @@ declare namespace OrgChart {
|
|
|
3225
3225
|
detachTree
|
|
3226
3226
|
}
|
|
3227
3227
|
|
|
3228
|
-
|
|
3228
|
+
/**
|
|
3229
|
+
* [Example with all actions](https://code.balkan.app/org-chart-js/which-action-triggers-redraw#JS)
|
|
3230
|
+
*/
|
|
3229
3231
|
enum action {
|
|
3232
|
+
|
|
3233
|
+
/**
|
|
3234
|
+
* OrgChart.action.update = 7;
|
|
3235
|
+
* ```typescript
|
|
3236
|
+
* let chart = new OrgChart('#tree', {
|
|
3237
|
+
* });
|
|
3238
|
+
* chart.onRedraw(() => {
|
|
3239
|
+
* if (chart.manager.action == OrgChart.action.update) {
|
|
3240
|
+
* alert("chart updated");
|
|
3241
|
+
* }
|
|
3242
|
+
* });
|
|
3243
|
+
* chart.load(nodes)
|
|
3244
|
+
* ```
|
|
3245
|
+
*/
|
|
3230
3246
|
update,
|
|
3247
|
+
|
|
3248
|
+
/**
|
|
3249
|
+
* OrgChart.action.expand = 0;
|
|
3250
|
+
* ```typescript
|
|
3251
|
+
* let chart = new OrgChart('#tree', {
|
|
3252
|
+
* });
|
|
3253
|
+
* chart.onRedraw(() => {
|
|
3254
|
+
* if (chart.manager.action == OrgChart.action.expand) {
|
|
3255
|
+
* chart.fit();
|
|
3256
|
+
* }
|
|
3257
|
+
* });
|
|
3258
|
+
* chart.load(nodes)
|
|
3259
|
+
* ```
|
|
3260
|
+
*/
|
|
3231
3261
|
expand,
|
|
3262
|
+
|
|
3263
|
+
/**
|
|
3264
|
+
* OrgChart.action.collapse = 1;
|
|
3265
|
+
* ```typescript
|
|
3266
|
+
* let chart = new OrgChart('#tree', {
|
|
3267
|
+
* });
|
|
3268
|
+
* chart.onRedraw(() => {
|
|
3269
|
+
* if (chart.manager.action == OrgChart.action.collapse) {
|
|
3270
|
+
* chart.fit();
|
|
3271
|
+
* }
|
|
3272
|
+
* });
|
|
3273
|
+
* chart.load(nodes)
|
|
3274
|
+
* ```
|
|
3275
|
+
*/
|
|
3232
3276
|
collapse,
|
|
3233
3277
|
exporting,
|
|
3234
3278
|
init,
|
|
3279
|
+
|
|
3235
3280
|
/**
|
|
3236
3281
|
* OrgChart.action.centerNode = 9;
|
|
3237
3282
|
* ```typescript
|
|
3238
|
-
*
|
|
3283
|
+
* let chart = new OrgChart('#tree', {
|
|
3239
3284
|
* });
|
|
3240
3285
|
* chart.onInit(() => {
|
|
3241
3286
|
* chart.center(2);
|
|
3242
3287
|
* console.log(chart.manager.action);
|
|
3243
3288
|
* });
|
|
3244
|
-
*
|
|
3245
3289
|
* chart.load(nodes)
|
|
3246
3290
|
* ```
|
|
3247
3291
|
*/
|