konva 10.4.0 → 10.6.0
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 +4 -4
- package/konva.js +3432 -3746
- package/konva.min.js +4 -4
- package/lib/Animation.d.ts +2 -2
- package/lib/Animation.js +2 -2
- package/lib/BezierFunctions.d.ts +1 -1
- package/lib/BezierFunctions.js +76 -116
- package/lib/Canvas.d.ts +1 -1
- package/lib/Canvas.js +8 -5
- package/lib/Container.js +9 -6
- package/lib/Context.d.ts +4 -5
- package/lib/Context.js +77 -72
- package/lib/DragAndDrop.d.ts +5 -3
- package/lib/DragAndDrop.js +65 -29
- package/lib/Factory.d.ts +3 -2
- package/lib/Factory.js +10 -9
- package/lib/Global.d.ts +0 -6
- package/lib/Global.js +2 -8
- package/lib/Layer.js +9 -6
- package/lib/Node.d.ts +33 -15
- package/lib/Node.js +179 -135
- package/lib/PointerEvents.d.ts +1 -2
- package/lib/PointerEvents.js +20 -18
- package/lib/Shape.d.ts +2 -2
- package/lib/Shape.js +51 -7
- package/lib/Stage.d.ts +23 -14
- package/lib/Stage.js +221 -93
- package/lib/Tween.js +59 -66
- package/lib/Util.d.ts +3 -2
- package/lib/Util.js +43 -16
- package/lib/_CoreInternals.d.ts +25 -11
- package/lib/_FullInternals.d.ts +25 -11
- package/lib/filters/Blur.js +16 -12
- package/lib/filters/Brighten.d.ts +1 -0
- package/lib/filters/Brighten.js +1 -0
- package/lib/filters/Brightness.d.ts +2 -1
- package/lib/filters/Brightness.js +4 -4
- package/lib/filters/Emboss.js +16 -58
- package/lib/filters/Kaleidoscope.js +8 -15
- package/lib/filters/Mask.js +8 -8
- package/lib/filters/Pixelate.js +16 -29
- package/lib/filters/Threshold.d.ts +1 -1
- package/lib/filters/Threshold.js +1 -1
- package/lib/shapes/Arc.js +5 -3
- package/lib/shapes/Arrow.d.ts +2 -6
- package/lib/shapes/Arrow.js +68 -46
- package/lib/shapes/Image.js +16 -19
- package/lib/shapes/Label.d.ts +2 -3
- package/lib/shapes/Label.js +7 -21
- package/lib/shapes/Line.d.ts +1 -1
- package/lib/shapes/Line.js +1 -1
- package/lib/shapes/Path.d.ts +27 -2
- package/lib/shapes/Path.js +148 -142
- package/lib/shapes/RegularPolygon.js +1 -1
- package/lib/shapes/Sprite.js +2 -6
- package/lib/shapes/Text.d.ts +12 -4
- package/lib/shapes/Text.js +96 -54
- package/lib/shapes/TextPath.d.ts +4 -3
- package/lib/shapes/TextPath.js +40 -26
- package/lib/shapes/Transformer.d.ts +16 -1
- package/lib/shapes/Transformer.js +209 -130
- package/lib/types.d.ts +2 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -133,7 +133,7 @@ npm install konva canvas
|
|
|
133
133
|
npm install konva skia-canvas
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
Use the same scene graph API for server-side rendering and omit the stage's `container` attribute. DOM events require a browser, and canvas feature support depends on the selected backend.
|
|
137
137
|
|
|
138
138
|
```js
|
|
139
139
|
import Konva from 'konva';
|
|
@@ -143,7 +143,7 @@ const stage = new Konva.Stage({
|
|
|
143
143
|
width: 500,
|
|
144
144
|
height: 500,
|
|
145
145
|
});
|
|
146
|
-
//
|
|
146
|
+
// Add shapes and export the stage with the usual Konva drawing API.
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
# Backers
|
|
@@ -172,11 +172,11 @@ Konva uses Mocha for testing.
|
|
|
172
172
|
- While developing it is easy to use `npm start`. Just run it and go to [http://localhost:1234/unit-tests.html](http://localhost:1234/unit-tests.html). The watcher will rebuild the bundle on any change.
|
|
173
173
|
|
|
174
174
|
Konva is covered with hundreds of tests and well over a thousand assertions.
|
|
175
|
-
|
|
175
|
+
For each feature or bug fix, write a failing test first, implement the behavior, then verify that the test passes (test-driven development).
|
|
176
176
|
|
|
177
177
|
## Generate documentation
|
|
178
178
|
|
|
179
|
-
Run `npx gulp api`
|
|
179
|
+
Run `npm run build`, then `npx gulp api` to generate documentation from the current bundle in the `api` folder.
|
|
180
180
|
|
|
181
181
|
# Pull Requests
|
|
182
182
|
|