@balkangraph/orgchart.js 8.2.63 → 8.2.67

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 CHANGED
@@ -131,7 +131,7 @@ declare class OrgChart extends OrgChartBase {
131
131
  * Gets the current scale of the chart.
132
132
  * @param viewBox
133
133
  */
134
- getScale(viewBox?: Array<number>): void;
134
+ getScale(viewBox?: Array<number>): number;
135
135
  /**
136
136
  * Animates specified node with ripple animation - highlight the node.
137
137
  * @param id the id of the node
@@ -151,7 +151,7 @@ declare class OrgChart extends OrgChartBase {
151
151
  rippleId: string | number,
152
152
  vertical: boolean,
153
153
  horizontal: boolean
154
- }, callback?: () => void): void;
154
+ } | null, callback?: () => void): void;
155
155
  /**
156
156
  * Fits the content to the visible area.
157
157
  * @param callback called when the animation completes
@@ -171,6 +171,15 @@ declare class OrgChart extends OrgChartBase {
171
171
  * @param layout layout type
172
172
  * @param lcn lyout config name for the specified sub tree
173
173
  */
174
+
175
+ /**
176
+ * Adds new node to the nodes collection, redraws the chart and fires remove event
177
+ * @param data node data
178
+ * @param callback called at the end of animation
179
+ * @param fireEvent indicates if the add event will be called or not
180
+ */
181
+ addNode(data: object, callback?: () => void, fireEvent?: boolean): void;
182
+
174
183
  setLayout(layout: OrgChart.layout | number, lcn?: string): void;
175
184
  /**
176
185
  * Sets orientation.
@@ -765,6 +774,7 @@ declare class OrgChart extends OrgChartBase {
765
774
  static searchUI: any;
766
775
  static attr: any;
767
776
  static toolbarUI: any;
777
+ static elements: any;
768
778
  }
769
779
 
770
780
  declare namespace OrgChart {
@@ -1991,13 +2001,7 @@ declare class OrgChartBase {
1991
2001
  */
1992
2002
  removeNode(id: string | number, callback?: () => void, fireEvent?: boolean): void;
1993
2003
 
1994
- /**
1995
- * Adds new node to the nodes collection, redraws the chart and fires remove event
1996
- * @param data node data
1997
- * @param callback called at the end of animation
1998
- * @param fireEvent indicates if the add event will be called or not
1999
- */
2000
- addNode(data: object, callback?: () => void, fireEvent?: boolean): void;
2004
+
2001
2005
 
2002
2006
  /**
2003
2007
  * The on() method of the OrgChart class sets up a function that will be called whenever the specified event is delivered to the target. *
@@ -2005,7 +2009,7 @@ declare class OrgChartBase {
2005
2009
  * @param type A case-sensitive string representing the event type to listen for.
2006
2010
  * @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
2007
2011
  */
2008
- on(type: "init" | "field" | "update" | "add" | "remove" | "renderbuttons" | "label" | "render-link" | "drag" | "drop" | "redraw" | "expcollclick" | "exportstart" | "exportend" | "click" | "dbclick" | "slink-click" | "clink-click" | "up-click" | "import" | "adding" | "added" | "updated" | "key-down" | "visibility-change" | "renderdefs" | "render" | "prerender" | "screen-reader-text" | "removed" | "ready" | "ripple", listener: (sender: OrgChart, args?: any, args1?: any, args2?: any) => void | boolean): OrgChart;
2012
+ on(type: "init" | "field" | "update" | "add" | "remove" | "renderbuttons" | "label" | "render-link" | "drag" | "drop" | "redraw" | "expcollclick" | "exportstart" | "exportend" | "click" | "dbclick" | "slink-click" | "clink-click" | "up-click" | "searchclick" | "import" | "adding" | "added" | "updated" | "key-down" | "visibility-change" | "renderdefs" | "render" | "prerender" | "screen-reader-text" | "removed" | "ready" | "ripple", listener: (sender: OrgChart, args?: any, args1?: any, args2?: any) => void | boolean): OrgChart;
2009
2013
 
2010
2014
  /**
2011
2015
  * Occurs when the node data has been updated by updateNode method.