@joint/core 4.0.1 → 4.0.3

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/types/joint.d.ts CHANGED
@@ -913,18 +913,18 @@ export namespace dia {
913
913
  }
914
914
  }
915
915
 
916
- class ElementView extends CellViewGeneric<Element> {
916
+ class ElementView<E extends Element = Element> extends CellViewGeneric<E> {
917
917
 
918
- update(element?: Element, renderingOnlyAttrs?: { [key: string]: any }): void;
918
+ update(element?: E, renderingOnlyAttrs?: { [key: string]: any }): void;
919
919
 
920
920
  setInteractivity(value: boolean | ElementView.InteractivityOptions): void;
921
921
 
922
922
  getDelegatedView(): ElementView | null;
923
923
 
924
924
  findPortNode(portId: string | number): SVGElement | null;
925
- findPortNode(portId: string | number, selector: string): Element | null;
925
+ findPortNode(portId: string | number, selector: string): E | null;
926
926
 
927
- findPortNodes(portId: string | number, groupSelector: string): Element[];
927
+ findPortNodes(portId: string | number, groupSelector: string): E[];
928
928
 
929
929
  protected renderMarkup(): void;
930
930
 
@@ -999,14 +999,14 @@ export namespace dia {
999
999
 
1000
1000
  }
1001
1001
 
1002
- interface Options extends mvc.ViewOptions<Link, SVGElement> {
1002
+ interface Options<L extends Link = Link> extends mvc.ViewOptions<L, SVGElement> {
1003
1003
  labelsLayer?: Paper.Layers | string | false;
1004
1004
  }
1005
1005
  }
1006
1006
 
1007
- class LinkView extends CellViewGeneric<Link> {
1007
+ class LinkView<L extends Link = Link> extends CellViewGeneric<L> {
1008
1008
 
1009
- options: LinkView.Options;
1009
+ options: LinkView.Options<L>;
1010
1010
  sourceAnchor: g.Point;
1011
1011
  targetAnchor: g.Point;
1012
1012
 
@@ -1074,6 +1074,8 @@ export namespace dia {
1074
1074
 
1075
1075
  removeRedundantLinearVertices(opt?: dia.ModelSetOptions): number;
1076
1076
 
1077
+ startArrowheadMove(end: dia.LinkEnd, options?: any): unknown;
1078
+
1077
1079
  protected updateRoute(): void;
1078
1080
 
1079
1081
  protected updatePath(): void;
@@ -1313,7 +1315,7 @@ export namespace dia {
1313
1315
  gridWidth?: number;
1314
1316
  gridHeight?: number;
1315
1317
  padding?: Padding;
1316
- allowNewOrigin?: 'negative' | 'positive' | 'any';
1318
+ allowNewOrigin?: false | 'negative' | 'positive' | 'any';
1317
1319
  allowNegativeBottomRight?: boolean;
1318
1320
  minWidth?: number;
1319
1321
  minHeight?: number;
@@ -1799,8 +1801,6 @@ export namespace dia {
1799
1801
  hide(): this;
1800
1802
 
1801
1803
  mount(): this;
1802
-
1803
- protected simulateRelatedView(el: SVGElement): void;
1804
1804
  }
1805
1805
 
1806
1806
  namespace ToolView {
@@ -1820,6 +1820,8 @@ export namespace dia {
1820
1820
 
1821
1821
  configure(opt?: ToolView.Options): this;
1822
1822
 
1823
+ protected simulateRelatedView(el: SVGElement): void;
1824
+
1823
1825
  show(): void;
1824
1826
 
1825
1827
  hide(): void;
@@ -3300,6 +3302,8 @@ export namespace mvc {
3300
3302
 
3301
3303
  isMounted(): boolean;
3302
3304
 
3305
+ protected findAttributeNode(attributeName: string, node: Element): Element | null;
3306
+
3303
3307
  protected init(): void;
3304
3308
 
3305
3309
  protected onRender(): void;
@@ -3600,7 +3604,7 @@ export namespace anchors {
3600
3604
  endMagnet: SVGElement,
3601
3605
  anchorReference: g.Point | SVGElement,
3602
3606
  opt: AnchorArgumentsMap[K],
3603
- endType: string,
3607
+ endType: dia.LinkEnd,
3604
3608
  linkView: dia.LinkView
3605
3609
  ): g.Point;
3606
3610
  }
@@ -3699,7 +3703,7 @@ export namespace connectionPoints {
3699
3703
  endView: dia.CellView,
3700
3704
  endMagnet: SVGElement,
3701
3705
  opt: ConnectionPointArgumentsMap[K],
3702
- endType: string,
3706
+ endType: dia.LinkEnd,
3703
3707
  linkView: dia.LinkView
3704
3708
  ): g.Point;
3705
3709
  }
@@ -4082,6 +4086,14 @@ export namespace elementTools {
4082
4086
  constructor(opt?: Button.Options);
4083
4087
 
4084
4088
  protected onPointerDown(evt: dia.Event): void;
4089
+
4090
+ protected position(): void;
4091
+
4092
+ protected getCellMatrix(): SVGMatrix;
4093
+
4094
+ protected getElementMatrix(): SVGMatrix;
4095
+
4096
+ protected getLinkMatrix(): SVGMatrix;
4085
4097
  }
4086
4098
 
4087
4099
  class Remove extends Button {