konva 10.6.0 → 10.7.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.
- package/README.md +12 -8
- package/konva.js +617 -231
- package/konva.min.js +4 -4
- package/lib/Canvas.d.ts +9 -2
- package/lib/Canvas.js +83 -5
- package/lib/Container.d.ts +3 -2
- package/lib/Container.js +27 -12
- package/lib/Context.d.ts +5 -2
- package/lib/Context.js +22 -1
- package/lib/Global.d.ts +2 -1
- package/lib/Global.js +8 -3
- package/lib/Group.d.ts +7 -1
- package/lib/Group.js +61 -0
- package/lib/Layer.d.ts +1 -1
- package/lib/Layer.js +4 -2
- package/lib/Node.d.ts +12 -7
- package/lib/Node.js +53 -44
- package/lib/Shape.d.ts +9 -15
- package/lib/Shape.js +145 -85
- package/lib/Stage.d.ts +0 -2
- package/lib/Stage.js +2 -13
- package/lib/Util.d.ts +1 -0
- package/lib/Util.js +25 -0
- package/lib/shapes/Arc.js +3 -3
- package/lib/shapes/Arrow.d.ts +1 -0
- package/lib/shapes/Arrow.js +7 -1
- package/lib/shapes/Circle.d.ts +1 -0
- package/lib/shapes/Circle.js +4 -1
- package/lib/shapes/Ellipse.d.ts +1 -0
- package/lib/shapes/Ellipse.js +4 -1
- package/lib/shapes/Image.d.ts +2 -1
- package/lib/shapes/Image.js +6 -3
- package/lib/shapes/Label.js +18 -20
- package/lib/shapes/Line.d.ts +1 -0
- package/lib/shapes/Line.js +4 -1
- package/lib/shapes/Path.js +1 -1
- package/lib/shapes/Rect.d.ts +1 -0
- package/lib/shapes/Rect.js +4 -1
- package/lib/shapes/RegularPolygon.js +1 -1
- package/lib/shapes/Ring.d.ts +7 -0
- package/lib/shapes/Ring.js +8 -1
- package/lib/shapes/Sprite.d.ts +2 -1
- package/lib/shapes/Sprite.js +6 -3
- package/lib/shapes/Star.d.ts +6 -0
- package/lib/shapes/Star.js +5 -1
- package/lib/shapes/Text.d.ts +5 -2
- package/lib/shapes/Text.js +49 -22
- package/lib/shapes/TextPath.d.ts +7 -0
- package/lib/shapes/TextPath.js +16 -1
- package/lib/shapes/Transformer.d.ts +10 -2
- package/lib/shapes/Transformer.js +55 -6
- package/lib/shapes/Wedge.js +1 -1
- package/package.json +2 -18
package/README.md
CHANGED
|
@@ -30,12 +30,12 @@ This repository began as a GitHub fork of [ericdrowell/KineticJS](https://github
|
|
|
30
30
|
|
|
31
31
|
## Framework integrations
|
|
32
32
|
|
|
33
|
-
| Framework | Package
|
|
34
|
-
|
|
35
|
-
| React
|
|
36
|
-
| Vue
|
|
37
|
-
| Svelte
|
|
38
|
-
| Angular
|
|
33
|
+
| Framework | Package | Documentation |
|
|
34
|
+
| --------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
|
35
|
+
| React | [`react-konva`](https://www.npmjs.com/package/react-konva) | [React guide](https://konvajs.org/docs/react/index.html) |
|
|
36
|
+
| Vue | [`vue-konva`](https://www.npmjs.com/package/vue-konva) | [Vue guide](https://konvajs.org/docs/vue/index.html) |
|
|
37
|
+
| Svelte | [`svelte-konva`](https://www.npmjs.com/package/svelte-konva) | [Svelte guide](https://konvajs.org/docs/svelte/index.html) |
|
|
38
|
+
| Angular | [`ng2-konva`](https://www.npmjs.com/package/ng2-konva) | [Angular guide](https://konvajs.org/docs/angular/index.html) |
|
|
39
39
|
|
|
40
40
|
# Quick Look
|
|
41
41
|
|
|
@@ -48,8 +48,12 @@ document.body.appendChild(container);
|
|
|
48
48
|
const stage = new Konva.Stage({ container, width: 600, height: 400 });
|
|
49
49
|
const layer = new Konva.Layer();
|
|
50
50
|
const box = new Konva.Rect({
|
|
51
|
-
x: 50,
|
|
52
|
-
|
|
51
|
+
x: 50,
|
|
52
|
+
y: 50,
|
|
53
|
+
width: 120,
|
|
54
|
+
height: 80,
|
|
55
|
+
fill: '#00a8e8',
|
|
56
|
+
draggable: true,
|
|
53
57
|
});
|
|
54
58
|
|
|
55
59
|
layer.add(box);
|