@visuallyjs/browser-ui 1.2.1 → 1.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visuallyjs/browser-ui",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "license": "Commercial",
5
5
  "main": "js/visuallyjs.browser-ui.cjs.js",
6
6
  "module": "js/visuallyjs.browser-ui.esm.js",
@@ -1,7 +1,6 @@
1
1
  import { ImageBackgroundOptions, TilingStrategy } from "./background-options";
2
2
  import { Size } from "../../../core";
3
3
  import { VisuallyJSDOMElement } from "../../element-facade";
4
- import { PanZoom } from "../../pan-zoom";
5
4
  import { BrowserUI } from "../../browser-visuallyjs-instance";
6
5
  import { ImageBackground, InternalBackgroundOptions } from "../../definitions";
7
6
  /**
@@ -86,7 +85,6 @@ export declare class TiledBackground implements ImageBackground {
86
85
  private layers;
87
86
  private currentLayer;
88
87
  widgetZoom: number;
89
- zoomWidget: PanZoom;
90
88
  width: number;
91
89
  height: number;
92
90
  tileSize: Size;
@@ -70,6 +70,16 @@ export declare class Lasso {
70
70
  _generatedLassoContent: BrowserElement;
71
71
  _lastPageLocation: PointXY;
72
72
  constructor(options: LassoOptions);
73
+ /**
74
+ * list of selectors that should be filtered regardless of user preference
75
+ */
76
+ _systemFilteredSelectors: string[];
77
+ /**
78
+ * Filter function that always runs regardless of user filter
79
+ * @param e
80
+ * @private
81
+ */
82
+ private _systemFilter;
73
83
  private _prepareFilter;
74
84
  private _position;
75
85
  private _setVisible;
@@ -202,6 +202,9 @@ export interface VertexUpdatedParams {
202
202
  originalPortId?: string;
203
203
  reason: VertexUpdatedReason;
204
204
  port?: Port;
205
+ typeChanged?: boolean;
206
+ newType?: string;
207
+ previousType?: string;
205
208
  }
206
209
  /**
207
210
  * Payload for a port removed event.
@@ -226,6 +229,42 @@ export interface PortUpdatedParams {
226
229
  originalId: string;
227
230
  originalPortId?: string;
228
231
  }
232
+ /**
233
+ * Payload for an edge type changed event
234
+ */
235
+ export interface EdgeTypeChangedParams {
236
+ obj: Edge;
237
+ previousType: string;
238
+ newType: string;
239
+ isPartOfUpdate?: boolean;
240
+ }
241
+ /**
242
+ * Payload for a node type changed event
243
+ */
244
+ export interface NodeTypeChangedParams {
245
+ obj: Node;
246
+ previousType: string;
247
+ newType: string;
248
+ isPartOfUpdate?: boolean;
249
+ }
250
+ /**
251
+ * Payload for a port type changed event
252
+ */
253
+ export interface PortTypeChangedParams {
254
+ obj: Port;
255
+ previousType: string;
256
+ newType: string;
257
+ isPartOfUpdate?: boolean;
258
+ }
259
+ /**
260
+ * Payload for a group type changed event
261
+ */
262
+ export interface GroupTypeChangedParams {
263
+ obj: Group;
264
+ previousType: string;
265
+ newType: string;
266
+ isPartOfUpdate?: boolean;
267
+ }
229
268
  /**
230
269
  * Payload for an edge added event
231
270
  * @group Events
@@ -263,6 +302,9 @@ export interface EdgeUpdatedParams {
263
302
  updates: ObjectData;
264
303
  originalData: ObjectData;
265
304
  reason?: EdgeUpdatedReason;
305
+ typeChanged?: boolean;
306
+ newType?: string;
307
+ previousType?: string;
266
308
  }
267
309
  /**
268
310
  * @internal
@@ -8,11 +8,14 @@ import { Edge, Group, Port, Node } from "../model/graph";
8
8
  export declare class UpdateAction<ReasonType> implements UndoRedoAction {
9
9
  obj: Node | Port | Group | Edge;
10
10
  protected instance: VisuallyJsModel;
11
+ protected typeChanged: boolean;
12
+ protected newType: string;
13
+ protected previousType: string;
11
14
  type: string;
12
15
  readonly $nd: any;
13
16
  protected readonly $od: any;
14
17
  private readonly reason;
15
- constructor(obj: Node | Port | Group | Edge, originalData: any, instance: VisuallyJsModel, reason: ReasonType);
18
+ constructor(obj: Node | Port | Group | Edge, originalData: any, instance: VisuallyJsModel, reason: ReasonType, typeChanged: boolean, newType: string, previousType: string);
16
19
  private _do;
17
20
  undo(): void;
18
21
  redo(): void;
@@ -7,6 +7,9 @@ import { UpdateAction } from "./update-action";
7
7
  export declare class VertexUpdateAction extends UpdateAction<VertexUpdatedReason> {
8
8
  obj: Node | Port | Group | Edge;
9
9
  protected instance: VisuallyJsModel;
10
+ protected typeChanged: boolean;
11
+ protected newType: string;
12
+ protected previousType: string;
10
13
  type: string;
11
- constructor(obj: Node | Port | Group | Edge, originalData: any, instance: VisuallyJsModel, reason: VertexUpdatedReason);
14
+ constructor(obj: Node | Port | Group | Edge, originalData: any, instance: VisuallyJsModel, reason: VertexUpdatedReason, typeChanged: boolean, newType: string, previousType: string);
12
15
  }
@@ -211,12 +211,17 @@ export declare abstract class UICore<EL, EVT = CoreUIEvent> extends OptimisticEv
211
211
  /**
212
212
  * @internal
213
213
  */
214
- private _refreshLayoutOnEdgeConnect;
214
+ private $relayoutOnEdgeConnect;
215
215
  /**
216
216
  * @internal
217
217
  * @private
218
218
  */
219
219
  protected $relayoutOnResize: boolean;
220
+ /**
221
+ * @internal
222
+ * @protected
223
+ */
224
+ protected $relayoutOnVertexRemove: boolean;
220
225
  /**
221
226
  * @internal
222
227
  */
@@ -189,10 +189,14 @@ export interface UICoreOptions<E, O extends UICoreDefaults> {
189
189
  * Whether or not to relayout the UI when an element's size changes as a result of content changes in its element. Defaults to false.
190
190
  */
191
191
  relayoutOnResize?: boolean;
192
+ /**
193
+ * Whether or not to relayout the UI when a vertex is removed. Defaults to false. For some layouts, like the Hierarchy layout, you may wish to switch this on.
194
+ */
195
+ relayoutOnVertexRemove?: boolean;
192
196
  /**
193
197
  * When true, the UI will run a `refresh` of the underlying layout whenever a new edge is established. This defaults to false, but you might want to set this to true if you're using the Hierarchical or Hierarchy layouts, because it has a bearing on the way they paint. However, if your users are able to drag vertices around, you may not wish for the layout to move things that they have placed, which is why this defaults to false.
194
198
  */
195
- refreshLayoutOnEdgeConnect?: boolean;
199
+ relayoutOnEdgeConnect?: boolean;
196
200
  /**
197
201
  * Default options for edges - these will apply to all edge types in the UI.
198
202
  */
@@ -1 +1 @@
1
- export declare const VERSION = "1.2.1";
1
+ export declare const VERSION = "1.2.2";