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.
Files changed (53) hide show
  1. package/README.md +12 -8
  2. package/konva.js +617 -231
  3. package/konva.min.js +4 -4
  4. package/lib/Canvas.d.ts +9 -2
  5. package/lib/Canvas.js +83 -5
  6. package/lib/Container.d.ts +3 -2
  7. package/lib/Container.js +27 -12
  8. package/lib/Context.d.ts +5 -2
  9. package/lib/Context.js +22 -1
  10. package/lib/Global.d.ts +2 -1
  11. package/lib/Global.js +8 -3
  12. package/lib/Group.d.ts +7 -1
  13. package/lib/Group.js +61 -0
  14. package/lib/Layer.d.ts +1 -1
  15. package/lib/Layer.js +4 -2
  16. package/lib/Node.d.ts +12 -7
  17. package/lib/Node.js +53 -44
  18. package/lib/Shape.d.ts +9 -15
  19. package/lib/Shape.js +145 -85
  20. package/lib/Stage.d.ts +0 -2
  21. package/lib/Stage.js +2 -13
  22. package/lib/Util.d.ts +1 -0
  23. package/lib/Util.js +25 -0
  24. package/lib/shapes/Arc.js +3 -3
  25. package/lib/shapes/Arrow.d.ts +1 -0
  26. package/lib/shapes/Arrow.js +7 -1
  27. package/lib/shapes/Circle.d.ts +1 -0
  28. package/lib/shapes/Circle.js +4 -1
  29. package/lib/shapes/Ellipse.d.ts +1 -0
  30. package/lib/shapes/Ellipse.js +4 -1
  31. package/lib/shapes/Image.d.ts +2 -1
  32. package/lib/shapes/Image.js +6 -3
  33. package/lib/shapes/Label.js +18 -20
  34. package/lib/shapes/Line.d.ts +1 -0
  35. package/lib/shapes/Line.js +4 -1
  36. package/lib/shapes/Path.js +1 -1
  37. package/lib/shapes/Rect.d.ts +1 -0
  38. package/lib/shapes/Rect.js +4 -1
  39. package/lib/shapes/RegularPolygon.js +1 -1
  40. package/lib/shapes/Ring.d.ts +7 -0
  41. package/lib/shapes/Ring.js +8 -1
  42. package/lib/shapes/Sprite.d.ts +2 -1
  43. package/lib/shapes/Sprite.js +6 -3
  44. package/lib/shapes/Star.d.ts +6 -0
  45. package/lib/shapes/Star.js +5 -1
  46. package/lib/shapes/Text.d.ts +5 -2
  47. package/lib/shapes/Text.js +49 -22
  48. package/lib/shapes/TextPath.d.ts +7 -0
  49. package/lib/shapes/TextPath.js +16 -1
  50. package/lib/shapes/Transformer.d.ts +10 -2
  51. package/lib/shapes/Transformer.js +55 -6
  52. package/lib/shapes/Wedge.js +1 -1
  53. 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 | 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) |
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, y: 50, width: 120, height: 80,
52
- fill: '#00a8e8', draggable: true,
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);