-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from ComfyFluffy/feat/custom-nodes
feat: support adding custom konva nodes
- Loading branch information
Showing
9 changed files
with
103 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,14 @@ | |
], | ||
"homepage": "https://github.com/konvajs/vue-konva#readme", | ||
"author": "Rafael Escala <[email protected]>", | ||
"main": "dist/vue-konva.umd.js", | ||
"types": "dist/index.d.ts", | ||
"main": "dist/vue-konva.umd.js", | ||
"module": "dist/vue-konva.mjs", | ||
"exports": { | ||
"import": "./dist/vue-konva.mjs", | ||
"require": "./dist/vue-konva.umd.js", | ||
"types": "./dist/index.d.ts" | ||
}, | ||
"vetur": { | ||
"tags": "vetur/tags.json", | ||
"attributes": "vetur/attributes.json" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,3 @@ | ||
import Konva from 'konva'; | ||
import { Node } from 'konva/lib/Node'; | ||
|
||
export const KONVA_NODES = [ | ||
'Arc', | ||
'Arrow', | ||
'Circle', | ||
'Ellipse', | ||
'FastLayer', | ||
'Group', | ||
'Image', | ||
'Label', | ||
'Layer', | ||
'Line', | ||
'Path', | ||
'Rect', | ||
'RegularPolygon', | ||
'Ring', | ||
'Shape', | ||
'Sprite', | ||
'Star', | ||
'Tag', | ||
'Text', | ||
'TextPath', | ||
'Transformer', | ||
'Wedge', | ||
] as const; | ||
|
||
export type KonvaNodes = | ||
Konva.Arrow | | ||
Konva.Arc | | ||
Konva.Circle | | ||
Konva.Ellipse | | ||
Konva.FastLayer | | ||
Konva.Image | | ||
Konva.Label | | ||
Konva.Line | | ||
Konva.Path | | ||
Konva.Rect | | ||
Konva.RegularPolygon | | ||
Konva.Ring | | ||
Konva.Shape | | ||
Konva.Sprite | | ||
Konva.Stage | | ||
Konva.Star | | ||
Konva.Tag | | ||
Konva.Text | | ||
Konva.TextPath | | ||
Konva.Transformer | | ||
Konva.Wedge | ||
export type KonvaNodeConstructor = new (...args: any) => Node<any>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters