babylonjs-node-geometry-editor 7.25.2 → 7.26.1

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.
@@ -66,6 +66,7 @@ declare module BABYLON.NodeGeometryEditor {
66
66
  private _diagramContainerRef;
67
67
  private _graphCanvas;
68
68
  private _diagramContainer;
69
+ private _historyStack;
69
70
  private _startX;
70
71
  private _moveInProgress;
71
72
  private _leftWidth;
@@ -78,6 +79,7 @@ declare module BABYLON.NodeGeometryEditor {
78
79
  private _popUpWindow;
79
80
  appendBlock(dataToAppend: BABYLON.NodeGeometryBlock | BABYLON.NodeGeometryEditor.SharedUIComponents.INodeData, recursion?: boolean): BABYLON.NodeGeometryEditor.SharedUIComponents.GraphNode;
80
81
  addValueNode(type: string): BABYLON.NodeGeometryEditor.SharedUIComponents.GraphNode;
82
+ prepareHistoryStack(): void;
81
83
  componentDidMount(): void;
82
84
  componentWillUnmount(): void;
83
85
  constructor(props: IGraphEditorProps);
@@ -116,6 +118,7 @@ declare module BABYLON.NodeGeometryEditor {
116
118
  stateManager: BABYLON.NodeGeometryEditor.SharedUIComponents.StateManager;
117
119
  onBuiltObservable: BABYLON.Observable<void>;
118
120
  onResetRequiredObservable: BABYLON.Observable<boolean>;
121
+ onClearUndoStack: BABYLON.Observable<void>;
119
122
  onZoomToFitRequiredObservable: BABYLON.Observable<void>;
120
123
  onReOrganizedRequiredObservable: BABYLON.Observable<void>;
121
124
  onPreviewModeChanged: BABYLON.Observable<void>;
@@ -811,8 +814,9 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
811
814
  * Class handling undo / redo operations
812
815
  */
813
816
  export class HistoryStack implements BABYLON.IDisposable {
814
- private _history;
817
+ private _historyStack;
815
818
  private _redoStack;
819
+ private _activeData;
816
820
  private readonly _maxHistoryLength;
817
821
  private _locked;
818
822
  private _dataProvider;
@@ -823,13 +827,19 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
823
827
  * @param applyUpdate defines the code to execute when undo/redo operation is required
824
828
  */
825
829
  constructor(dataProvider: () => any, applyUpdate: (data: any) => void);
830
+ /**
831
+ * Process key event to handle undo / redo
832
+ * @param evt defines the keyboard event to process
833
+ * @returns true if the event was processed
834
+ */
835
+ processKeyEvent(evt: KeyboardEvent): boolean;
826
836
  /**
827
837
  * Resets the stack
828
838
  */
829
839
  reset(): void;
830
840
  private _generateJSONDiff;
831
841
  private _applyJSONDiff;
832
- private _rebuildState;
842
+ private _copy;
833
843
  /**
834
844
  * Stores the current state
835
845
  */
@@ -1364,6 +1374,8 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1364
1374
  get nodeB(): BABYLON.NodeGeometryEditor.SharedUIComponents.GraphNode | undefined;
1365
1375
  intersectsWith(rect: DOMRect): boolean;
1366
1376
  update(endX?: number, endY?: number, straight?: boolean): void;
1377
+ get path(): SVGPathElement;
1378
+ get selectionPath(): SVGPathElement;
1367
1379
  constructor(graphCanvas: BABYLON.NodeGeometryEditor.SharedUIComponents.GraphCanvasComponent, portA: BABYLON.NodeGeometryEditor.SharedUIComponents.NodePort, nodeA: BABYLON.NodeGeometryEditor.SharedUIComponents.GraphNode, portB?: BABYLON.NodeGeometryEditor.SharedUIComponents.NodePort, nodeB?: BABYLON.NodeGeometryEditor.SharedUIComponents.GraphNode);
1368
1380
  onClick(evt: MouseEvent): void;
1369
1381
  dispose(notify?: boolean): void;
@@ -1448,6 +1460,7 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1448
1460
  set enclosingFrameId(value: number);
1449
1461
  set isSelected(value: boolean);
1450
1462
  setIsSelected(value: boolean, marqueeSelection: boolean): void;
1463
+ get rootElement(): HTMLDivElement;
1451
1464
  constructor(content: BABYLON.NodeGeometryEditor.SharedUIComponents.INodeData, stateManager: BABYLON.NodeGeometryEditor.SharedUIComponents.StateManager);
1452
1465
  isOverlappingFrame(frame: BABYLON.NodeGeometryEditor.SharedUIComponents.GraphFrame): boolean;
1453
1466
  getPortForPortData(portData: BABYLON.NodeGeometryEditor.SharedUIComponents.IPortData): BABYLON.NodeGeometryEditor.SharedUIComponents.NodePort | null;
@@ -1497,6 +1510,7 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1497
1510
  private _headerTextElement;
1498
1511
  private _headerCollapseElement;
1499
1512
  private _headerCloseElement;
1513
+ private _headerFocusElement;
1500
1514
  private _commentsElement;
1501
1515
  private _portContainer;
1502
1516
  private _outputPortContainer;
@@ -1526,6 +1540,7 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1526
1540
  private readonly _closeSVG;
1527
1541
  private readonly _expandSVG;
1528
1542
  private readonly _collapseSVG;
1543
+ private readonly _focusSVG;
1529
1544
  get id(): number;
1530
1545
  get isCollapsed(): boolean;
1531
1546
  private _createInputPort;
@@ -1554,6 +1569,11 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1554
1569
  get comments(): string;
1555
1570
  set comments(comments: string);
1556
1571
  constructor(candidate: BABYLON.Nullable<HTMLDivElement>, canvas: BABYLON.NodeGeometryEditor.SharedUIComponents.GraphCanvasComponent, doNotCaptureNodes?: boolean);
1572
+ private _isFocused;
1573
+ /**
1574
+ * Enter/leave focus mode
1575
+ */
1576
+ switchFocusMode(): void;
1557
1577
  refresh(): void;
1558
1578
  addNode(node: BABYLON.NodeGeometryEditor.SharedUIComponents.GraphNode): void;
1559
1579
  removeNode(node: BABYLON.NodeGeometryEditor.SharedUIComponents.GraphNode): void;