File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/components/canvas/anchors Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ type TAnchorState = {
2828 selected : boolean ;
2929} ;
3030
31- export class Anchor extends GraphComponent < TAnchorProps , TAnchorState > {
31+ export class Anchor < T extends TAnchorProps = TAnchorProps > extends GraphComponent < T , TAnchorState > {
3232 public readonly cursor = "pointer" ;
3333
3434 public get zIndex ( ) {
@@ -38,7 +38,7 @@ export class Anchor extends GraphComponent<TAnchorProps, TAnchorState> {
3838
3939 public declare state : TAnchorState ;
4040
41- public declare props : TAnchorProps ;
41+ public declare props : T ;
4242
4343 public declare context : TGraphLayerContext ;
4444
@@ -59,7 +59,7 @@ export class Anchor extends GraphComponent<TAnchorProps, TAnchorState> {
5959 }
6060 ) ;
6161
62- constructor ( props : TAnchorProps , parent : GraphLayer ) {
62+ constructor ( props : T , parent : GraphLayer ) {
6363 super ( props , parent ) ;
6464 this . state = { size : props . size , raised : false , selected : false } ;
6565
You can’t perform that action at this time.
0 commit comments