@nasser-sw/fabric 7.0.1-beta3 → 7.0.1-beta4

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 (105) hide show
  1. package/0 +0 -0
  2. package/dist/index.js +323 -155
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist/index.min.mjs +1 -1
  7. package/dist/index.min.mjs.map +1 -1
  8. package/dist/index.mjs +323 -155
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/index.node.cjs +323 -155
  11. package/dist/index.node.cjs.map +1 -1
  12. package/dist/index.node.mjs +323 -155
  13. package/dist/index.node.mjs.map +1 -1
  14. package/dist/package.json.min.mjs +1 -1
  15. package/dist/package.json.mjs +1 -1
  16. package/dist/src/shapes/Line.d.ts +31 -86
  17. package/dist/src/shapes/Line.d.ts.map +1 -1
  18. package/dist/src/shapes/Line.min.mjs +1 -1
  19. package/dist/src/shapes/Line.min.mjs.map +1 -1
  20. package/dist/src/shapes/Line.mjs +323 -154
  21. package/dist/src/shapes/Line.mjs.map +1 -1
  22. package/dist-extensions/src/shapes/CustomLine.d.ts +10 -0
  23. package/dist-extensions/src/shapes/CustomLine.d.ts.map +1 -0
  24. package/dist-extensions/src/shapes/Line.d.ts +31 -86
  25. package/dist-extensions/src/shapes/Line.d.ts.map +1 -1
  26. package/fabric-test-editor.html +157 -8
  27. package/fabric-test2.html +513 -0
  28. package/fabric.ts +182 -182
  29. package/package.json +1 -1
  30. package/src/shapes/Line.ts +372 -158
  31. package/debug/konva/CHANGELOG.md +0 -1474
  32. package/debug/konva/LICENSE +0 -22
  33. package/debug/konva/README.md +0 -205
  34. package/debug/konva/gulpfile.mjs +0 -110
  35. package/debug/konva/package.json +0 -139
  36. package/debug/konva/release.sh +0 -65
  37. package/debug/konva/resources/doc-includes/ContainerParams.txt +0 -6
  38. package/debug/konva/resources/doc-includes/NodeParams.txt +0 -20
  39. package/debug/konva/resources/doc-includes/ShapeParams.txt +0 -53
  40. package/debug/konva/resources/jsdoc.conf.json +0 -28
  41. package/debug/konva/rollup.config.mjs +0 -32
  42. package/debug/konva/src/Animation.ts +0 -237
  43. package/debug/konva/src/BezierFunctions.ts +0 -826
  44. package/debug/konva/src/Canvas.ts +0 -193
  45. package/debug/konva/src/Container.ts +0 -649
  46. package/debug/konva/src/Context.ts +0 -1017
  47. package/debug/konva/src/Core.ts +0 -5
  48. package/debug/konva/src/DragAndDrop.ts +0 -173
  49. package/debug/konva/src/Factory.ts +0 -246
  50. package/debug/konva/src/FastLayer.ts +0 -29
  51. package/debug/konva/src/Global.ts +0 -210
  52. package/debug/konva/src/Group.ts +0 -31
  53. package/debug/konva/src/Layer.ts +0 -546
  54. package/debug/konva/src/Node.ts +0 -3477
  55. package/debug/konva/src/PointerEvents.ts +0 -67
  56. package/debug/konva/src/Shape.ts +0 -2081
  57. package/debug/konva/src/Stage.ts +0 -1000
  58. package/debug/konva/src/Tween.ts +0 -811
  59. package/debug/konva/src/Util.ts +0 -1123
  60. package/debug/konva/src/Validators.ts +0 -210
  61. package/debug/konva/src/_CoreInternals.ts +0 -85
  62. package/debug/konva/src/_FullInternals.ts +0 -171
  63. package/debug/konva/src/canvas-backend.ts +0 -36
  64. package/debug/konva/src/filters/Blur.ts +0 -388
  65. package/debug/konva/src/filters/Brighten.ts +0 -48
  66. package/debug/konva/src/filters/Brightness.ts +0 -30
  67. package/debug/konva/src/filters/Contrast.ts +0 -75
  68. package/debug/konva/src/filters/Emboss.ts +0 -207
  69. package/debug/konva/src/filters/Enhance.ts +0 -154
  70. package/debug/konva/src/filters/Grayscale.ts +0 -25
  71. package/debug/konva/src/filters/HSL.ts +0 -108
  72. package/debug/konva/src/filters/HSV.ts +0 -106
  73. package/debug/konva/src/filters/Invert.ts +0 -23
  74. package/debug/konva/src/filters/Kaleidoscope.ts +0 -274
  75. package/debug/konva/src/filters/Mask.ts +0 -220
  76. package/debug/konva/src/filters/Noise.ts +0 -44
  77. package/debug/konva/src/filters/Pixelate.ts +0 -107
  78. package/debug/konva/src/filters/Posterize.ts +0 -46
  79. package/debug/konva/src/filters/RGB.ts +0 -82
  80. package/debug/konva/src/filters/RGBA.ts +0 -103
  81. package/debug/konva/src/filters/Sepia.ts +0 -27
  82. package/debug/konva/src/filters/Solarize.ts +0 -29
  83. package/debug/konva/src/filters/Threshold.ts +0 -44
  84. package/debug/konva/src/index.ts +0 -3
  85. package/debug/konva/src/shapes/Arc.ts +0 -176
  86. package/debug/konva/src/shapes/Arrow.ts +0 -231
  87. package/debug/konva/src/shapes/Circle.ts +0 -76
  88. package/debug/konva/src/shapes/Ellipse.ts +0 -121
  89. package/debug/konva/src/shapes/Image.ts +0 -319
  90. package/debug/konva/src/shapes/Label.ts +0 -386
  91. package/debug/konva/src/shapes/Line.ts +0 -364
  92. package/debug/konva/src/shapes/Path.ts +0 -1013
  93. package/debug/konva/src/shapes/Rect.ts +0 -79
  94. package/debug/konva/src/shapes/RegularPolygon.ts +0 -167
  95. package/debug/konva/src/shapes/Ring.ts +0 -94
  96. package/debug/konva/src/shapes/Sprite.ts +0 -370
  97. package/debug/konva/src/shapes/Star.ts +0 -125
  98. package/debug/konva/src/shapes/Text.ts +0 -1065
  99. package/debug/konva/src/shapes/TextPath.ts +0 -583
  100. package/debug/konva/src/shapes/Transformer.ts +0 -1889
  101. package/debug/konva/src/shapes/Wedge.ts +0 -129
  102. package/debug/konva/src/skia-backend.ts +0 -35
  103. package/debug/konva/src/types.ts +0 -84
  104. package/debug/konva/tsconfig.json +0 -31
  105. package/debug/konva/tsconfig.test.json +0 -7
@@ -1,1474 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- This project adheres to [Semantic Versioning](http://semver.org/).
5
-
6
- ## 10.0.0-0 (2025-08-14)
7
-
8
- ### Breaking Changes
9
-
10
- - **Breaking**: Konva module is fully migrated from CommonJS modules to ES modules. It may break some older bundlers and CommonJS environments. In CommonJS environment you have to use default property from require:
11
-
12
- ```js
13
- // before
14
- const Konva = require('konva');
15
-
16
- // after
17
- const Konva = require('konva').default;
18
- ```
19
-
20
- - **Breaking:** Dropped default support for node.js environment. Now you have to explicitly import it:
21
-
22
- ```bash
23
- npm install canvas
24
- ```
25
-
26
- ```js
27
- import Konva from 'konva';
28
- import 'konva/canvas-backend';
29
- ```
30
-
31
- Motivation: With increased usage of `konva` in SSR environments like Next.js, loading native canvas rendering on the server is unnecessary since we don't render canvas content server-side. Removing this requirement simplifies setup by avoiding native modules when they aren't needed.
32
-
33
- - Improved text positioning to match DOM/CSS rendering. To restore previous behaviour use `Konva.legacyTextRendering = true`. This should NOT break major part of the apps. But if you care about pixel-perfect position of text elements, that change may effect you.
34
-
35
- ### New Features
36
-
37
- - Added new `skia` render backend for node.js:
38
-
39
- ```bash
40
- npm install skia-canvas
41
- ```
42
-
43
- ```js
44
- import Konva from 'konva';
45
- import 'konva/skia-backend';
46
- ```
47
-
48
- - Native filters support via `node.filters(['blur(10px)'])`. Native fitlers works MUCH faster if supported nativily (Chrome, Firefox). If there is no native support, Konva will automatially fallback to functional filter (on Safari).
49
-
50
- ```js
51
- node.filters(['blur(10px')]);
52
- node.cache();
53
- ```
54
-
55
- - New property `charRenderFunc` for `Konva.Text` for controlling "per-character-render". May be useful any character animations:
56
-
57
- ```js
58
- var text = new Konva.Text({
59
- x: 10,
60
- y: 10,
61
- text: 'AB',
62
- fontSize: 20,
63
- charRenderFunc: function ({ context, index }) {
64
- if (index === 1) {
65
- // shift only the second character
66
- context.translate(0, 10);
67
- }
68
- },
69
- });
70
- ```
71
-
72
- - **New**: Added `Konva.Filters.Brightness` filter in replace of deprecated `Konva.Filters.Brighten` to better match with css filters logic.
73
- - Added `cornerRadius` support for `Konva.RegularPolygon`
74
- - Added `miterLimit` property support for `Konva.Shape` to control line join appearance
75
-
76
- ### Bug Fixes
77
-
78
- - Fixed corner radius render for `Konva.Rect` when negative width or height are used
79
- - Fixed TextPath rendering on right align for some fonts
80
- - Fixed crash when node inside transformer was destroyed
81
- - Fixed mouseup + click events order when clicked on empty area of stage
82
- - Fixed transformer drag behavior with non-draggable nodes
83
-
84
- ### Technical Improvements
85
-
86
- - **Performance**: Rewrote Emboss and Solarize filters for improved performance and usability
87
- - Changed return type of `node.toImage()`
88
-
89
- ## 9.3.22 (2025-07-08)
90
-
91
- - Fixed possible crash on `node.to()` method
92
-
93
- ## 9.3.21 (2025-07-07)
94
-
95
- - Fixed memory leaks on Tween destroy
96
- - Fixed incorrect export of stage/layer when internal nodes used buffer canvas for rendering
97
- - Fixed incorrect render of cached node when buffer canvas is used
98
- - Fixed incorrect path lenth calculations
99
- - Fixed `pointerleave` bubbling
100
- - Added `pointerleave` event in `Stage`
101
-
102
- ## 9.3.20 (2025-03-20)
103
-
104
- - Fix text rendering when ellipses are used
105
-
106
- ## 9.3.19 (2025-03-12)
107
-
108
- - Typescript fixes
109
- - Memory leak fixes
110
-
111
- ## 9.3.18 (2024-12-23)
112
-
113
- - Fixed emoji split in multiple lines
114
-
115
- ## 9.3.17 (2024-12-23)
116
-
117
- - Fixed `Arrow.getClientRect()`
118
- - Fixed emoji rendering with letterSpacing
119
- - Fixed line-through for justify text
120
- - Changes in letter spacing width calculations to match DOM rendering
121
-
122
- ## 9.3.16 (2024-10-21)
123
-
124
- - Fix freeze on ios on touch cancel event
125
- - Typescript fixes
126
-
127
- ## 9.3.15 (2024-09-09)
128
-
129
- - fix letter spacing for Hindi text
130
- - ts fixes
131
-
132
- ### 9.3.14 (2024-07-16)
133
-
134
- - Fix shadow + corner radius for images
135
- - Support `fillRule` for `Konva.Shape` on hit graph
136
-
137
- ### 9.3.13 (2024-07-05)
138
-
139
- - Fallback for `Konva.Text.measureSize()` when 2d context doesn't return full data
140
-
141
- ### 9.3.12 (2024-06-20)
142
-
143
- - Fix stopped transforming when it was triggered by multi-touch
144
- - Fix svg `path.getPointAtLength()` calculations in some cases
145
- - Fix `shape.getClientRect()` when any of parents is cached
146
-
147
- ### 9.3.11 (2024-05-23)
148
-
149
- - Fix chrome clear canvas issue
150
- - Typescript fixes
151
-
152
- ### 9.3.9 (2024-05-20)
153
-
154
- - Fix underline and line-through for `Konva.Text` when `Konva._fixTextRendering = true`
155
-
156
- ### 9.3.8 (2024-05-15)
157
-
158
- - Fix click events fires on stage
159
- - Temporary `Konva._fixTextRendering = true` flag to fix inconsistent text
160
-
161
- ### 9.3.6 (2024-03-04)
162
-
163
- - Fix transformer bug to enable hit graph back
164
-
165
- ### 9.3.5 (2024-03-04)
166
-
167
- - `tranformer` event will be triggered AFTER all data of transformer is updated
168
- - Improve performance of transformer
169
-
170
- ### 9.3.4 (2024-03-03)
171
-
172
- - Fix clipping with zero size
173
-
174
- ### 9.3.3 (2024-02-09)
175
-
176
- - Another fix for exporting buffered shapes
177
-
178
- ### 9.3.2 (2024-01-26)
179
-
180
- - Fix large memory usage on node export
181
-
182
- ### 9.3.1 (2024-01-17)
183
-
184
- - Fix Pixelate filter work/fix caching size
185
- - Fix node export when large buffer canvas is used
186
-
187
- ### 9.3.0 (2023-12-20)
188
-
189
- - New attribute `rotateLineVisible` for `Konva.Transformer` to show/hide rotate line
190
-
191
- ### 9.2.3 (2023-10-31)
192
-
193
- - Better `Konva.Transformer` work when it has `flipEnabled = false`.
194
-
195
- ### 9.2.2 (2023-09-14)
196
-
197
- - Better RTL support
198
- - Some typescript fixes
199
-
200
- ### 9.2.1 (2023-09-14)
201
-
202
- - Fix text rendering when text has both underline and shadow
203
- - Typescript fixes
204
-
205
- ### 9.2.0 (2023-05-14)
206
-
207
- - More controls on clipping
208
- - `fillRule` for `Konva.Shape`
209
-
210
- ### 9.1.0 (2023-05-14)
211
-
212
- - New `anchorStyleFunc` for `Konva.Transformer` to customize anchor style
213
-
214
- ### 9.0.2 (2023-05-14)
215
-
216
- - Better text rendering when it has stroke
217
-
218
- ### 9.0.1 (2023-04-17)
219
-
220
- - Better performance for any instance creation
221
- - Little typescript fixes
222
-
223
- ### 9.0.0 (2023-04-13)
224
-
225
- - Migrate the npm package from ES back to CommonJS
226
-
227
- ### 8.4.4 (2023-04-05)
228
-
229
- - Some fixes for `Konva.TextPath` calculations and rendering.
230
- - Resolve "willReadFrequently" warning in Chrome
231
-
232
- ### 8.4.3 (2023-03-23)
233
-
234
- - Typescript fixes
235
- - Better validation for `Konva.Transfomer` `nodes` property
236
-
237
- ### 8.4.2 (2023-01-20)
238
-
239
- - Fix justify on text with limited height
240
-
241
- ### 8.4.1 (2023-01-19)
242
-
243
- - Typescript fixes for `container.add()` method. Ability to use empty array as argument. E.g. `container.add(...emptyArray)`
244
- - Fix underline for justify text
245
- - Fix gradient display on underline or line-through text
246
-
247
- ### 8.4.0 (2023-01-05)
248
-
249
- - Add support for `cornerRadius` for Konva.Image
250
- - Fix cloning of `Konva.Transformer`
251
-
252
- ### 8.3.14 (2022-11-09)
253
-
254
- - Automatically release (destroy) used canvas elements. Should fix safari memory issues
255
-
256
- ### 8.3.13 (2022-10-03)
257
-
258
- - Typescript fixes
259
- - Better non-passive events usage
260
- - Better 2d context usage to avoid Chrome warnings
261
-
262
- ### 8.3.12 (2022-08-29)
263
-
264
- - `ellipsis` fixes for `Konva.Text`
265
- - Allow reset component attributes via overloader
266
-
267
- ### 8.3.11 (2022-08-05)
268
-
269
- - Fix `Konva.Label` position when tag attributes are changed
270
- - Fix incorrect ellipsis display for `Konva.Text`
271
- - Fix `click` event trigger on parent containers on touch devices
272
- - Fix incorrect `mouseleave` event trigger when drag is finished
273
-
274
- ### 8.3.10 (2022-06-20)
275
-
276
- - Skip `Konva.Transformer` in `container.getClientRect()` calculations
277
-
278
- ### 8.3.9 (2022-05-27)
279
-
280
- - Typescript fixes
281
-
282
- ### 8.3.8 (2022-05-05)
283
-
284
- - Disable all exports in `package.json`
285
-
286
- ### 8.3.7 (2022-05-04)
287
-
288
- - Migrate to CommonJS exports only
289
-
290
- ### 8.3.6 (2022-04-27)
291
-
292
- - Better exports definitions. Importing `Konva` should work better in different bundlers and test environments.
293
- - `imageSmoothingEnabled` option for `node.toDataURL()`, `node.toCanvas()` and `node.toImage()`
294
-
295
- ## 8.3.5 (2022-03-21)
296
-
297
- - Quick fix for `toCanvas()` and `toDataURL()` size calculation.
298
-
299
- ## 8.3.4 (2022-03-13)
300
-
301
- - Fix characters positions calculations on `fontFamily` changes in `TextPath`.
302
- - Remove rounding in `node.getClientRect()` results
303
- - Fix event object on `transformstart` event.
304
-
305
- ## 8.3.3 (2022-02-23)
306
-
307
- - Fix `justify` align for text with several paragraphs.
308
-
309
- ## 8.3.2
310
-
311
- - Remove source maps for webpack builds
312
-
313
- ## 8.3.1 (2021-12-09)
314
-
315
- - Fix `dbltap` event in Safari
316
- - A bit faster `node.moveToTop()` when node is already on top
317
- - Better client rect calculations for `Konva.Arc` shape.
318
-
319
- ## 8.3.0 (2021-11-15)
320
-
321
- - new `transformer.anchorDragBoundFunc` method.
322
-
323
- ## 8.2.4 (2021-11-15)
324
-
325
- - Fix not working `Konva.Transformer` when several transformers were used
326
-
327
- ## 8.2.2
328
-
329
- - Fix `Konva.Arrow` rendering when it has two pointers
330
-
331
- ## 8.2.1
332
-
333
- - Fix `package.json` exports.
334
-
335
- ## 8.2.0
336
-
337
- - Restore build in CommonJS. `const Konva = require('konva/cmj').default;`
338
- - Fix arrow rendering when dash is used
339
- - Fix `dbltap` trigger when multi-touch is used
340
-
341
- ## 8.1.4
342
-
343
- - Fix `dblclick` event when `cancelBubble` is used.
344
-
345
- ## 8.1.3
346
-
347
- - Fix `fillPattern` cache invalidation on shapes
348
-
349
- ## 8.1.2
350
-
351
- - Fix memory leak for `Konva.Image`
352
-
353
- ## 8.1.1
354
-
355
- - Fix `Konva.Transformer` dragging draw when `shouldOverdrawWholeArea = true`.
356
- - Fix auto redraw when `container.removeChildren()` or `container.destroyChildren()` are used
357
-
358
- ## 8.1.0
359
-
360
- - New property `useSingleNodeRotation` for `Konva.Transformer`.
361
-
362
- ## 8.0.4
363
-
364
- - Fix fill pattern updates on `fillPatternX` and `fillPatternY` changes.
365
-
366
- ## 8.0.2
367
-
368
- - Fix some transform caches
369
- - Fix cache with hidden shapes
370
-
371
- ## 8.0.1
372
-
373
- - Some typescript fixes
374
-
375
- ## 8.0.0
376
-
377
- This is a very large release! The long term of `Konva` API is to make it simpler and faster. So when possible I am trying to optimize the code and remove unpopular/confusing API methods.
378
-
379
- **BREAKING:**
380
-
381
- - `Konva.Collection` is removed. `container.children` is a simple array now. `container.find()` will returns an array instead of `Konva.Collection()` instance.
382
- `Konva.Collection` was confusing for many users. Also it was slow and worked with a bit of magic. So I decided to get rif of it. Now we are going to use good old arrays.
383
-
384
- ```js
385
- // old code:
386
- group.find('Shape').visible(false);
387
-
388
- // new code:
389
- group.find('Shape').forEach((shape) => shape.visible(false));
390
- ```
391
-
392
- - argument `selector` is removed from `node.getIntersection(pos)` API. I don't think you even knew about it.
393
- - `Konva.Util.extend` is removed.
394
- - All "content" events from `Konva.Stage` are removed. E.g. instead of `contentMousemove` just use `mousemove` event.
395
-
396
- **New features:**
397
-
398
- - All updates on canvas will do automatic redraw with `layer.batchDraw()`. This features is configurable with `Konva.autoDrawEnabled` property. Konva will automatically redraw layer when you change any property, remove or add nodes, do caching. So you don't need to call `layer.draw()` or `layer.batchDraw()` in most of the cases.
399
- - New method `layer.getNativeCanvasElement()`
400
- - new `flipEnabled` property for `Konva.Transformer`
401
- - new `node.isClientRectOnScreen()` method
402
- - Added `Konva.Util.degToRad` and `Konva.Util.radToDeg`
403
- - Added `node.getRelativePointerPosition()`
404
-
405
- **Changes and fixes:**
406
-
407
- - **Full migration to ES modules package (!), commonjs code is removed.**
408
- - **`konva-node` is merged into `konva` npm package. One package works for both environments.**
409
- - Full event system rewrite. Much better `pointer` events support.
410
- - Fix `TextPath` recalculations on `fontSize` change
411
- - Better typescript support. Now every module has its own `*.d.ts` file.
412
- - Removed `Konva.UA`, `Konva._parseUA` (it was used for old browser detection)
413
- - Fixed Arrow head position when an arrow has tension
414
- - `textPath.getKerning()` is removed
415
- - Fix `a` command parsing for `Konva.Path`
416
- - Fix fill pattern for `Konva.Text` when the pattern has an offset or rotation
417
- - `Konva.names` and `Konva.ids` are removed
418
- - `Konva.captureTouchEventsEnabled` is renamed to `Konva.capturePointerEventsEnabled`
419
-
420
- ## 7.2.5
421
-
422
- - Fix transform update on `letterSpacing` change of `Konva.Text`
423
-
424
- ## 7.2.4
425
-
426
- - Fix wrong `mouseleave` trigger for `Konva.Stage`
427
-
428
- ## 7.2.3
429
-
430
- - Fix transformer rotation when parent of a node is rotated too.
431
-
432
- ## 7.2.2
433
-
434
- - Fix wrong size calculations for `Konva.Line` with tension
435
- - Fix `shape.intersects()` behavior when a node is dragged
436
- - Fix ellipsis rendering for `Konva.Text`
437
-
438
- ## 7.2.1
439
-
440
- - Fix correct rendering of `Konva.Label` when heigh of text is changed
441
- - Fix correct `transformstart` and `transformend` events when several nodes are attached with `Konva.Transformer`
442
-
443
- ## 7.2.0
444
-
445
- - New property `fillAfterStrokeEnabled` for `Konva.Shape`. See API docs for more information.
446
- - Fix for `Konva.Transformer` when it may fail to draw.
447
- - Fix rendering of `TextPath` one more time.
448
-
449
- ## 7.1.9
450
-
451
- - Fix autodrawing for `Konva.Transformer` when it is on a different layer
452
- - Fix `Konva.RegularPolygon` size calculations.
453
-
454
- ## 7.1.8
455
-
456
- - Fix incorrect rendering of `TextPath` in some cases. (again)
457
-
458
- ## 7.1.7
459
-
460
- - Fix incorrect rendering of `TextPath` in some cases.
461
-
462
- ## 7.1.6
463
-
464
- - Fix for correct image/dataURL/canvas exports for `Konva.Stage`.
465
-
466
- ## 7.1.5
467
-
468
- - Performance fixes for dragging many nodes with `Konva.Transformer`.
469
- - Documentation updates
470
-
471
- ## 7.1.4
472
-
473
- - Perf fixes
474
- - Change events trigger flow, so adding new events INSIDE event callback will work correctly.
475
- - Fix double `dragend`, `dragstart`, `dragmove` triggers on `Konva.Transformer`
476
-
477
- ## 7.1.3
478
-
479
- - Text rendering fixes
480
-
481
- ## 7.1.2
482
-
483
- - fix ellipses behavior for `Konva.Text`.
484
- - fix scaled fill pattern for text.
485
-
486
- ## 7.1.1
487
-
488
- - fixes for `dragstart` event when `Konva.Transformer` is used. `dragstart` event will have correct native `evt` reference
489
- - Better unicode support in `Konva.Text` and `Konva.TextPath`. Emoji should work better now 👍
490
-
491
- ## 7.1.0
492
-
493
- - Multi row support for `ellipsis` config for `Konva.Text`
494
- - Better `Konva.Transfomer` behavior when single attached node is programmatically rotated.
495
-
496
- ## 7.0.7
497
-
498
- - fixes for `dragstart` event when `Konva.Transformer` is used. `dragstart` will not bubble from transformer.
499
- - `string` and `fill` properties validation can accept `CanvasGradient` as valid value
500
-
501
- ## 7.0.6
502
-
503
- - Better performance for stage dragging
504
-
505
- ## 7.0.5
506
-
507
- - Fixes for `node.cache()` function.
508
-
509
- ## 7.0.4
510
-
511
- - Add `onUpdate` callbacks to `Konva.Tween` configuration and `node.to()` method.
512
- - Up to 6x faster initializations of objects, like `const shape = new Konva.Shape()`.
513
-
514
- ## 7.0.3 - 2020-07-09
515
-
516
- - Fix wring `dragend` trigger on `draggable` property change inside `click`
517
- - Fix incorrect text rendering with `letterSpacing !== 0`
518
- - Typescript fixes
519
-
520
- ## 7.0.2 - 2020-06-30
521
-
522
- - Fix wrong trigger `dbltap` and `click` on mobile
523
-
524
- ## 7.0.1 - 2020-06-29
525
-
526
- - Fixes for different font families support.
527
- - Fixes for `Konva.Transformer` positions
528
- - Types fixes for better Typescript support
529
-
530
- ## 7.0.0 - 2020-06-23
531
-
532
- - **BREAKING** `inherit` option is removed from `visible` and `listening`. They now just have boolean values `true` or `false`. If you do `group.listening(false);` then whole group and all its children will be removed from the hitGraph (and they will not listen to events). Probably 99% `Konva` applications will be not affected by this _breaking change_.
533
- - **Many performance fixes and code size optimizations. Up to 70% performance boost for many moving nodes.**
534
- - `layer.hitGraphEnabled()` is deprecated. Just use `layer.listening(false)` instead
535
- - Better support for font families with spaces inside (like `Font Awesome 5`).
536
- - Fix wrong `dblclick` and `dbltap` triggers
537
- - Deprecate `Konva.FastLayer`. Use `new Konva.Layer({ listening: false });` instead.
538
- - `dragmove` event will be fired on `Konva.Transformer` too when you drag a node.
539
- - `dragmove` triggers only after ALL positions of dragging nodes are changed
540
-
541
- ## 6.0.0 - 2020-05-08
542
-
543
- - **BREAKING!** `boundBoxFunc` of `Konva.Transformer` works in absolute coordinates of whole transformer. Previously in was working in local coordinates of transforming node.
544
- - Many `Konva.Transformer` fixes. Now it works correctly when you transform several rotated shapes.
545
- - Fix for wrong `mouseleave` and `mouseout` fire on shape remove/destroy.
546
-
547
- ## 5.0.3 - 2020-05-01
548
-
549
- - Fixes for `boundBoxFunc` of `Konva.Transformer`.
550
-
551
- ## 5.0.2 - 2020-04-23
552
-
553
- - Deatach fixes for `Konva.Transformer`
554
-
555
- ## 5.0.1 - 2020-04-22
556
-
557
- - Fixes for `Konva.Transformer` when parent scale is changed
558
- - Fixes for `Konva.Transformer` when parent is draggable
559
- - Performance optimizations
560
-
561
- ## 5.0.0 - 2020-04-21
562
-
563
- - **New `Konva.Transformer` implementation!**. Old API should work. But I marked this release is `major` (breaking) just for smooth updates. Changes:
564
- - Support of transforming multiple nodes at once: `tr.nodes([shape1, shape2])`.
565
- - `tr.node()`, `tr.setNode()`, `tr.attachTo()` methods are deprecated. Use `tr.nodes(array)` instead
566
- - Fixes for center scaling
567
- - Fixes for better `padding` support
568
- - `Transformer` can be placed anywhere in the tree of a stage tree (NOT just inside a parent of attached node).
569
- - Fix `imageSmoothEnabled` resets when stage is resized
570
- - Memory usage optimizations when a node is cached
571
-
572
- ## 4.2.2 - 2020-03-26
573
-
574
- - Fix hit stroke issues
575
-
576
- ## 4.2.1 - 2020-03-26
577
-
578
- - Fix some issues with `mouseenter` and `mouseleave` events.
579
- - Deprecate `hitStrokeEnabled` property
580
- - Fix rounding issues for `getClientRect()` for some shapes
581
-
582
- ## 4.2.0 - 2020-03-14
583
-
584
- - Add `rotationSnapTolerance` property to `Konva.Transformer`.
585
- - Add `getActiveAnchor()` method to `Konva.Transformer`
586
- - Fix hit for non-closed `Konva.Path`
587
- - Some fixes for experimental Offscreen canvas support inside a worker
588
-
589
- ## 4.1.6 - 2020-02-25
590
-
591
- - Events fixes for `Konva.Transformer`
592
- - Now `Konva` will keep `id` in a cloned node
593
- - Better error messages on tainted canvas issues
594
-
595
- ## 4.1.5 - 2020-02-16
596
-
597
- - Fixes for `path.getClientRect()` function calculations
598
-
599
- ## 4.1.4 - 2020-02-10
600
-
601
- - Fix wrong internal caching of absolute attributes
602
- - Fix `Konva.Transformer` behavior on scaled with CSS stage
603
-
604
- ## 4.1.3 - 2020-01-30
605
-
606
- - Fix line with tension calculations
607
- - Add `node.getAbsoluteRotation()` method
608
- - Fix cursor on anchors for rotated parent
609
-
610
- ## 4.1.2 - 2020-01-08
611
-
612
- - Fix possible `NaN` in content calculations
613
-
614
- ## 4.1.1 - 2020-01-07
615
-
616
- - Add ability to use `width = 0` and `height = 0` for `Konva.Image`.
617
- - Fix `cache()` method of `Konva.Arrow()`
618
- - Add `Transform` to `Konva` default exports. So `Konva.Transform` is available now.
619
-
620
- ## 4.1.0 - 2019-12-23
621
-
622
- - Make events work on some CSS transforms
623
- - Fix caching on float dimensions
624
- - Fix `mouseleave` event on stage.
625
- - Increase default anchor size for `Konva.Transformer` on touch devices
626
-
627
- ## 4.0.18 - 2019-11-20
628
-
629
- - Fix `path.getClientRect()` calculations for `Konva.Path`
630
- - Fix wrong fire of `click` and `tap` events on stopped drag events.
631
-
632
- ## 4.0.17 - 2019-11-08
633
-
634
- - Allow hitStrokeWidth usage, even if a shape has not stroke visible
635
- - Better IE11 support
636
-
637
- ## 4.0.16 - 2019-10-21
638
-
639
- - Warn on undefined return value of `dragBoundFunc`.
640
- - Better calculations for `container.getClientRect()`
641
-
642
- ## 4.0.15 - 2019-10-15
643
-
644
- - TS fixes
645
- - Better calculations for `TextPath` with align = right
646
- - Better `textPath.getClientRect()`
647
-
648
- ## 4.0.14 - 2019-10-11
649
-
650
- - TS fixes
651
- - Fix globalCompositeOperation + cached hit detections.
652
- - Fix absolute position calculations for cached parent
653
-
654
- ## 4.0.13 - 2019-10-02
655
-
656
- - Fix `line.getClientRect()` calculations for line with a tension or low number of points
657
-
658
- ## 4.0.12 - 2019-09-17
659
-
660
- - Fix some bugs when `Konva.Transformer` has `padding > 0`
661
-
662
- ## 4.0.10 - 2019-09-10
663
-
664
- - Fix drag position handling
665
- - Fix multiple selector for find() method
666
-
667
- ## 4.0.9 - 2019-09-06
668
-
669
- - Fix `Konva.Transformer` behavior on mirrored nodes
670
- - Fix `stage.getPointerPosition()` logic.
671
-
672
- ## 4.0.8 - 2019-09-05
673
-
674
- - Fix `dragend` event on click
675
- - Revert fillPatternScale for text fix.
676
-
677
- ## 4.0.7 - 2019-09-03
678
-
679
- - Fixed evt object on `dragstart`
680
- - Fixed double tap trigger after dragging
681
-
682
- ## 4.0.6 - 2019-08-31
683
-
684
- - Fix fillPatternScale for text
685
-
686
- ## 4.0.5 - 2019-08-17
687
-
688
- - Fix `dragstart` flow when `node.startDrag()` is called.
689
- - Fix `tap` and `dbltap` double trigger on stage
690
-
691
- ## 4.0.4 - 2019-08-12
692
-
693
- - Add `node.isCached()` method
694
- - Fix nested dragging bug
695
-
696
- ## 4.0.3 - 2019-08-08
697
-
698
- - Slightly changed `mousemove` event flow. It triggers for first `mouseover` event too
699
- - Better `Konva.hitOnDragEnabled` support for mouse inputs
700
-
701
- ## 4.0.2 - 2019-08-08
702
-
703
- - Fixed `node.startDrag()` behavior. We can call it at any time.
704
-
705
- ## 4.0.1 - 2019-08-07
706
-
707
- - Better `Konva.Arrow` + tension drawing
708
- - Typescript fixes
709
-
710
- ## 4.0.0 - 2019-08-05
711
-
712
- Basically the release doesn't have any breaking changes. You may only have issues if you are using something from `Konva.DD` object (which is private and never documented). Otherwise you should be fine. `Konva` has major upgrade about touch events system and drag&drop flow. The API is exactly the same. But the internal refactoring is huge so I decided to make a major version. Please upgrade carefully. Report about any issues you have.
713
-
714
- - Better multi-touch support. Now we can trigger several `touch` events on one or many nodes.
715
- - New drag&drop implementation. You can drag several shapes at once with several pointers.
716
- - HSL colors support
717
-
718
- ## 3.4.1 - 2019-07-18
719
-
720
- - Fix wrong double tap trigger
721
-
722
- ## 3.4.0 - 2019-07-12
723
-
724
- - TS types fixes
725
- - Added support for different values for `cornerRadius` of `Konva.Rect`
726
-
727
- ## 3.3.3 - 2019-06-07
728
-
729
- - Some fixes for better support `konva-node`
730
- - TS types fixes
731
-
732
- ## 3.3.2 - 2019-06-03
733
-
734
- - TS types fixes
735
-
736
- ## 3.3.1 - 2019-05-28
737
-
738
- - Add new property `imageSmoothingEnabled` to the node caching
739
- - Even more ts fixes. Typescript need a lot of attention, you know...
740
-
741
- ## 3.3.0 - 2019-05-28
742
-
743
- - Enable strict mode for ts types
744
- - Add new property `imageSmoothingEnabled` to the layer
745
-
746
- ## 3.2.7 - 2019-05-27
747
-
748
- - Typescript fixes
749
- - Experimental pointer events support. Do `Konva._pointerEventsEnabled = true;` to enable
750
- - Fix some `Konva.Transformer` bugs.
751
-
752
- ## 3.2.6 - 2019-05-09
753
-
754
- - Typescript fixes again
755
-
756
- ## 3.2.5 - 2019-04-17
757
-
758
- - Show a warning when `Konva.Transformer` and attaching node have different parents.
759
- - Typescript fixes
760
-
761
- ## 3.2.4 - 2019-04-05
762
-
763
- - Fix some stage events. `mouseenter` and `mouseleave` should work correctly on empty spaces
764
- - Fix some typescript types
765
- - Better detection of production mode (no extra warnings)
766
-
767
- ## 3.2.3 - 2019-03-21
768
-
769
- - Fix `hasName` method for empty name cases
770
-
771
- ## 3.2.2 - 2019-03-19
772
-
773
- - Remove `dependencies` from npm package
774
-
775
- ## 3.2.1 - 2019-03-18
776
-
777
- - Better `find` and `findOne` lookup. Now we should not care about duplicate ids.
778
- - Better typescript definitions
779
-
780
- ## 3.2.0 - 2019-03-10
781
-
782
- - new property `shape.hitStrokeWidth(10)`
783
- - Better typescript definitions
784
- - Remove `Object.assign` usage (for IE11 support)
785
-
786
- ## 3.1.7 - 2019-03-06
787
-
788
- - Better modules and TS types
789
-
790
- ## 3.1.6 - 2019-02-27
791
-
792
- - Fix commonjs exports
793
- - Fix global injections
794
-
795
- ## 3.1.0 - 2019-02-27
796
-
797
- - Make `Konva` modular: `import Konva from 'konva/lib/Core';`;
798
- - Fix incorrect `Transformer` behavior
799
- - Fix drag&drop for touch devices
800
-
801
- ## 3.0.0 - 2019-02-25
802
-
803
- ## Breaking
804
-
805
- Customs builds are temporary removed from npm package. You can not use `import Konva from 'konva/src/Core';`.
806
- This feature will be added back later.
807
-
808
- ### Possibly breaking
809
-
810
- That changes are private and internal specific. They should not break most of `Konva` apps.
811
-
812
- - `Konva.Util.addMethods` is removed
813
- - `Konva.Util._removeLastLetter` is removed
814
- - `Konva.Util._getImage` is removed
815
- - `Konv.Util._getRGBAString` is removed
816
- - `Konv.Util._merge` is removed
817
- - Removed polyfill for `requestAnimationFrame`.
818
- - `id` and `name` properties defaults are empty strings, not `undefined`
819
- - internal `_cache` property was updated to use es2015 `Map` instead of `{}`.
820
- - `Konva.Validators` is removed.
821
-
822
- ### Added
823
-
824
- - Show a warning when a stage has too many layers
825
- - Show a warning on duplicate ids
826
- - Show a warning on weird class in `Node.create` parsing from JSON
827
- - Show a warning for incorrect value for component setters.
828
- - Show a warning for incorrect value for `zIndex` property.
829
- - Show a warning when user is trying to reuse destroyed shape.
830
- - new publish method `measureSize(string)` for `Konva.Text`
831
- - You can configure what mouse buttons can be used for drag&drop. To enable right button you can use `Konva.dragButtons = [0, 1]`.
832
- - Now you can hide stage `stage.visible(false)`. It will set its container display style to "none".
833
- - New method `stage.setPointersPositions(event)`. Usually you don't need to use it manually.
834
- - New method `layer.toggleHitCanvas()` to show and debug hit areas
835
-
836
- ### Changed
837
-
838
- - Full rewrite to Typescript with tons of refactoring and small optimizations. The public API should be 100% the same
839
- - Fixed `patternImage` and `radialGradient` for `Konva.Text`
840
- - `Konva.Util._isObject` is renamed to `Konva.Util._isPlainObject`.
841
- - A bit changed behavior of `removeId` (private method), now it doesn't clear node ref, if object is changed.
842
- - simplified `batchDraw` method (it doesn't use `Konva.Animation`) now.
843
- - Performance improvements for shapes will image patterns, linear and radial fills
844
- - `text.getTextHeight()` is deprecated. Use `text.height()` or `text.fontSize()` instead.
845
- - Private method `stage._setPointerPosition()` is deprecated. Use `stage.setPointersPositions(event)`;
846
-
847
- ### Fixed
848
-
849
- - Better mouse support on mobile devices (yes, that is possible to connect mouse to mobile)
850
- - Better implementation of `mouseover` event for stage
851
- - Fixed underline drawing for text with `lineHeight !== 1`
852
- - Fixed some caching behavior when a node has `globalCompositeOperation`.
853
- - Fixed automatic updates for `Konva.Transformer`
854
- - Fixed container change for a stage.
855
- - Fixed warning for `width` and `height` attributes for `Konva.Text`
856
- - Fixed gradient drawing for `Konva.Text`
857
- - Fixed rendering with `strokeWidth = 0`
858
-
859
- ## 2.6.0 - 2018-12-14
860
-
861
- ### Changed
862
-
863
- - Performance fixes when cached node has many children
864
- - Better drawing for shape with `strokeScaleEnabled = false` on HDPI devices
865
-
866
- ### Added
867
-
868
- - New `ignoreStroke` for `Konva.Transformer`. Good to use when a shape has `strokeScaleEnabled = false`
869
-
870
- ### Changed
871
-
872
- - `getKerning` TextPath API is deprecated. Use `kerningFunc` instead.
873
-
874
- ## 2.5.1 - 2018-11-08
875
-
876
- ### Changed
877
-
878
- - Use custom functions for `trimRight` and `trimLeft` (for better browsers support)
879
-
880
- ## 2.5.0 - 2018-10-24
881
-
882
- ### Added
883
-
884
- - New `anchorCornerRadius` for `Konva.Transformer`
885
-
886
- ### Fixed
887
-
888
- - Performance fixes for caching
889
-
890
- ### Changed
891
-
892
- - `dragstart` event behavior is a bit changed. It will fire BEFORE actual position of a node is changed.
893
-
894
- ## 2.4.2 - 2018-10-12
895
-
896
- ### Fixed
897
-
898
- - Fixed a wrong cache when a shape inside group has `listening = false`
899
-
900
- ## 2.4.1 - 2018-10-08
901
-
902
- ### Changed
903
-
904
- - Added some text trim logic to wrap in better
905
-
906
- ### Fixed
907
-
908
- - `getClientRect` for complex paths fixes
909
- - `getClientRect` calculation fix for groups
910
- - Update `Konva.Transformer` on `rotateEnabled` change
911
- - Fix click stage event on dragend
912
- - Fix some Transformer cursor behavior
913
-
914
- ## 2.4.0 - 2018-09-19
915
-
916
- ### Added
917
-
918
- - Centered resize with ALT key for `Konva.Transformer`
919
- - New `centeredScaling` for `Konva.Transformer`
920
-
921
- ### Fixed
922
-
923
- - Tween support for gradient properties
924
- - Add `user-select: none` to the stage container to fix some "selected contend around" issues
925
-
926
- ## 2.3.0 - 2018-08-30
927
-
928
- ### Added
929
-
930
- - new methods `path.getLength()` and `path.getPointAtLength(val)`
931
- - `verticalAlign` for `Konva.Text`
932
-
933
- ## 2.2.2 - 2018-08-21
934
-
935
- ### Changed
936
-
937
- - Default duration for tweens and `node.to()` methods is now 300ms
938
- - Typescript fixes
939
- - Automatic validations for many attributes
940
-
941
- ## 2.2.1 - 2018-08-10
942
-
943
- ### Added
944
-
945
- - New properties for `Konva.Transformer`: `borderStroke`, `borderStrokeWidth`, `borderDash`, `anchorStroke`, `anchorStrokeWidth`, `anchorSize`.
946
-
947
- ### Changed
948
-
949
- - Some properties of `Konva.Transformer` are renamed. `lineEnabled` -> `borderEnabled`. `rotateHandlerOffset` -> `rotateAnchorOffset`, `enabledHandlers` -> `enabledAnchors`.
950
-
951
- ## 2.1.8 - 2018-08-01
952
-
953
- ### Fixed
954
-
955
- - Some `Konva.Transformer` fixes
956
- - Typescript fixes
957
- - `stage.toDataURL()` fixes when it has hidden layers
958
- - `shape.toDataURL()` automatically adjust position and size of resulted image
959
-
960
- ## 2.1.7 - 2018-07-03
961
-
962
- ### Fixed
963
-
964
- - `toObject` fixes
965
-
966
- ## 2.1.7 - 2018-07-03
967
-
968
- ### Fixed
969
-
970
- - Some drag&drop fixes
971
-
972
- ## 2.1.6 - 2018-06-16
973
-
974
- ### Fixed
975
-
976
- - Removed wrong dep
977
- - Typescript fixes
978
-
979
- ## 2.1.5 - 2018-06-15
980
-
981
- ### Fixed
982
-
983
- - Typescript fixes
984
- - add shape as second argument for `sceneFunc` and `hitFunc`
985
-
986
- ## 2.1.4 - 2018-06-15
987
-
988
- ### Fixed
989
-
990
- - Fixed `Konva.Text` justify drawing for a text with decoration
991
- - Added methods `data()`,`setData()` and `getData()` methods to `Konva.TextPath`
992
- - Correct cache reset for `Konva.Transformer`
993
-
994
- ## 2.1.3 - 2018-05-17
995
-
996
- ### Fixed
997
-
998
- - `Konva.Transformer` automatically track shape changes
999
- - `Konva.Transformer` works with shapes with offset too
1000
-
1001
- ## 2.1.2 - 2018-05-16
1002
-
1003
- ### Fixed
1004
-
1005
- - Cursor fixes for `Konva.Transformer`
1006
- - Fixed lineHeight behavior for `Konva.Text`
1007
- - Some performance optimizations for `Konva.Text`
1008
- - Better wrap algorithm for `Konva.Text`
1009
- - fixed `Konva.Arrow` with tension != 0
1010
- - Some fixes for `Konva.Transformer`
1011
-
1012
- ## 2.0.3 - 2018-04-21
1013
-
1014
- ### Added
1015
-
1016
- - Typescript defs for `Konva.Transformer`
1017
- - Typescript defs for `globalCompositeOperation`
1018
-
1019
- ## Changes
1020
-
1021
- - Fixed flow for `contextmenu` event. Now it will be triggered on shapes too
1022
- - `find()` method for Containers can use a function as a parameter
1023
-
1024
- ### Fixed
1025
-
1026
- - some bugs fixes for `group.getClientRect()`
1027
- - `Konva.Arrow` will not draw dash for pointers
1028
- - setAttr will trigger change event if new value is the same Object
1029
- - better behavior of `dblclick` event when you click fast on different shapes
1030
- - `stage.toDataURL` will use `pixelRatio = 1` by default.
1031
-
1032
- ## 2.0.2 - 2018-03-15
1033
-
1034
- ### Fixed
1035
-
1036
- - Even more bugs fixes for `Konva.Transformer`
1037
-
1038
- ## 2.0.1 - 2018-03-15
1039
-
1040
- ### Fixed
1041
-
1042
- - Several bugs fixes for `Konva.Transformer`
1043
-
1044
- ## 2.0.0 - 2018-03-15
1045
-
1046
- ### Added
1047
-
1048
- - new `Konva.Transformer`. It is a special group that allow simple resizing and rotation of a shape.
1049
- - Add ability to remove event by callback `node.off('event', callback)`.
1050
- - new `Konva.Filters.Contrast`.
1051
- - new `Konva.Util.haveIntersection()` to detect simple collusion
1052
- - add `Konva.Text.ellipsis` to add '…' to text string if width is fixed and wrap is set to 'none'
1053
- - add gradients for strokes
1054
-
1055
- ## Changed
1056
-
1057
- - stage events are slightly changed. `mousedown`, `click`, `mouseup`, `dblclick`, `touchstart`, `touchend`, `tap`, `dbltap` will be triggered when clicked on empty areas too
1058
-
1059
- ### Fixed
1060
-
1061
- - Some typescript fixes
1062
- - Pixelate filter fixes
1063
- - Fixes for path data parsing
1064
- - Fixed shadow size calculation
1065
-
1066
- ## Removed
1067
-
1068
- - Some deprecated methods are removed. If previous version was working without deprecation warnings for you, this one will work fine too.
1069
-
1070
- ## 1.7.6 - 2017-11-01
1071
-
1072
- ### Fixed
1073
-
1074
- - Some typescript fixes
1075
-
1076
- ## 1.7.4 - 2017-10-30
1077
-
1078
- ### Fixed
1079
-
1080
- - `isBrowser` detection for electron
1081
-
1082
- ## 1.7.3 - 2017-10-19
1083
-
1084
- ### Changed
1085
-
1086
- - Changing size of a stage will redraw it in synchronous way
1087
-
1088
- ### Fixed
1089
-
1090
- - Some fixes special for nodejs
1091
-
1092
- ## 1.7.2 - 2017-10-11
1093
-
1094
- ### Fixed
1095
-
1096
- - Fixed `Konva.document is undefined`
1097
-
1098
- ## 1.7.1 - 2017-10-11
1099
-
1100
- ### Changed
1101
-
1102
- - Konva for browser env and Konva for nodejs env are separate packages now. You can use `konva-node` for NodeJS env.
1103
-
1104
- ## 1.7.0 - 2017-10-08
1105
-
1106
- ### Fixed
1107
-
1108
- - Several typescript fixes
1109
-
1110
- ### Changed
1111
-
1112
- - Default value for `dragDistance` is changed to 3px.
1113
- - Fix rare error throw on drag
1114
- - Caching with height = 0 or width = 0 with throw async error. Caching will be ignored.
1115
-
1116
- ## 1.6.8 - 2017-08-19
1117
-
1118
- ### Changed
1119
-
1120
- - The `node.getClientRect()` calculation is changed a bit. It is more powerfull and correct. Also it takes parent transform into account. See docs.
1121
- - Upgrade nodejs deps
1122
-
1123
- ## 1.6.7 - 2017-07-28
1124
-
1125
- ### Fixed
1126
-
1127
- - Fix bug with double trigger wheel in Firefox
1128
- - Fix `node.getClientRect()` calculation in a case of Group + invisible child
1129
- - Fix dblclick issue https://github.com/konvajs/konva/issues/252
1130
-
1131
- ## 1.6.3 - 2017-05-24
1132
-
1133
- ### Fixed
1134
-
1135
- - Fixed bug with pointer detection. css 3d transformed stage will not work now.
1136
-
1137
- ## 1.6.2 - 2017-05-08
1138
-
1139
- ### Fixed
1140
-
1141
- - Fixed bug with automatic shadow for negative scale values
1142
-
1143
- ## 1.6.1 - 2017-04-25
1144
-
1145
- ### Fixed
1146
-
1147
- - Fix pointer position detection
1148
-
1149
- ### Changed
1150
-
1151
- - moved `globalCompositeOperation` property to `Konva.Node`
1152
-
1153
- ## 1.6.0 - 2017-04-21
1154
-
1155
- ### Added
1156
-
1157
- - support of globalCompositeOperation for `Konva.Shape`
1158
-
1159
- ### Fixed
1160
-
1161
- - getAllIntersections now works ok for Text shapes (https://github.com/konvajs/konva/issues/224)
1162
-
1163
- ### Changed
1164
-
1165
- - Konva a bit changed a way to detect pointer position. Now it should be OK to apply css transform on Konva container. https://github.com/konvajs/konva/pull/215
1166
-
1167
- ## 1.5.0 - 2017-03-20
1168
-
1169
- ### Added
1170
-
1171
- - support for `lineDashOffset` property for `Konva.Shape`.
1172
-
1173
- ## 1.4.0 - 2017-02-07
1174
-
1175
- ## Added
1176
-
1177
- - `textDecoration` of `Konva.Text` now supports `line-through`
1178
-
1179
- ## 1.3.0 - 2017-01-10
1180
-
1181
- ## Added
1182
-
1183
- - new align value for `Konva.Text` and `Konva.TextPath`: `justify`
1184
- - new property for `Konva.Text` and `Konva.TextPath`: `textDecoration`. Right now it sports only '' (no decoration) and 'underline' values.
1185
- - new property for `Konva.Text`: `letterSpacing`
1186
- - new event `contentContextmenu` for `Konva.Stage`
1187
- - `align` support for `Konva.TextPath`
1188
- - new method `toCanvas()` for converting a node into canvas element
1189
-
1190
- ### Changed
1191
-
1192
- - changing a size of `Konva.Stage` will update it in async way (via `batchDraw`).
1193
- - `shadowOffset` respect pixel ratio now
1194
-
1195
- ### Fixed
1196
-
1197
- - Fixed bug when `Konva.Tag` width was not changing its width dynamically
1198
- - Fixed "calling remove() for dragging shape will throw an error"
1199
- - Fixed wrong opacity level for cached group with opacity
1200
- - More consistent shadows on HDPI screens
1201
- - Fixed memory leak for nodes with several names
1202
-
1203
- ## 1.2.2 - 2016-09-15
1204
-
1205
- ### Fixed
1206
-
1207
- - refresh stage hit and its `dragend`
1208
- - `getClientRect` calculations
1209
-
1210
- ## 1.2.0 - 2016-09-15
1211
-
1212
- ## Added
1213
-
1214
- - new properties for `Konva.TextPath`: `letterSpacing` and `textBaseline`.
1215
-
1216
- ## 1.1.4 - 2016-09-13
1217
-
1218
- ### Fixed
1219
-
1220
- - Prevent throwing an error when text property of `Konva.Text` = undefined or null
1221
-
1222
- ## 1.1.3 - 2016-09-12
1223
-
1224
- ### Changed
1225
-
1226
- - Better hit function for `TextPath`.
1227
- - Validation of `Shape` filters.
1228
-
1229
- ## 1.1.2 - 2016-09-10
1230
-
1231
- ### Fixed
1232
-
1233
- - Fixed "Dragging Group on mobile view throws "missing preventDefault" error" #169
1234
-
1235
- ## 1.1.1 - 2016-08-30
1236
-
1237
- ### Fixed
1238
-
1239
- - Fixed #166 bug of drag&drop
1240
-
1241
- ## 1.1.0 - 2016-08-21
1242
-
1243
- ## Added
1244
-
1245
- - new property of `Konva.Shape` - `preventDefault`.
1246
-
1247
- ## 1.0.3 - 2016-08-14
1248
-
1249
- ### Fixed
1250
-
1251
- - Fixed some typescript definitions
1252
-
1253
- ## 1.0.2 - 2016-07-08
1254
-
1255
- ## Changed
1256
-
1257
- - `Konva.Text` will interpret undefined `width` and `height` as `AUTO`
1258
-
1259
- ## 1.0.1 - 2016-07-05
1260
-
1261
- ### Changed
1262
-
1263
- - you can now unset property by `node.x(undefined)` or `node.setAttr('x', null)`
1264
-
1265
- ### Fixed
1266
-
1267
- - Bug fix for case when `touchend` event throws error
1268
-
1269
- ## 1.0.0 - 2016-07-05
1270
-
1271
- ### Fixed
1272
-
1273
- - Bug fix for case when `touchend` event throws error
1274
-
1275
- ## 0.15.0 - 2016-06-18
1276
-
1277
- ## Added
1278
-
1279
- - Custom clip function
1280
-
1281
- ## 0.14.0 - 2016-06-17
1282
-
1283
- ### Fixed
1284
-
1285
- - fixes in typescript definitions
1286
- - fixes for bug with `mouseenter` event on deep nesting case
1287
-
1288
- ## 0.13.9 - 2016-05-14
1289
-
1290
- ### Changed
1291
-
1292
- - typescript definition in npm package
1293
- - node@5.10.1, canvas@1.3.14, jsdom@8.5.0 support
1294
- - `Konva.Path` will be filled when it is not closed
1295
- - `Animation.start()` will not not immediate sync draw. This should improve performance a little.
1296
- - Warning when node for `Tween` is not in layer yet.
1297
- - `removeChildren()` remove only first level children. So it will not remove grandchildren.
1298
-
1299
- ## 0.12.4 - 2016-04-19
1300
-
1301
- ### Changed
1302
-
1303
- - `batchDraw` will do not immediate `draw()`
1304
-
1305
- ### Fixed
1306
-
1307
- - fix incorrect shadow offset on rotation
1308
-
1309
- ## 0.12.3 - 2016-04-07
1310
-
1311
- ### Fixed
1312
-
1313
- - `batchDraw` function works less time now
1314
- - lighter npm package
1315
-
1316
- ## 0.12.2 - 2016-03-31
1317
-
1318
- ### Fixed
1319
-
1320
- - repair `cancelBubble` event property behaviour
1321
- - fix wrong `Path` `getClientRect()` calculation
1322
- - better HDPI support
1323
- - better typescript definitions
1324
- - node 0.12 support
1325
-
1326
- ### Changed
1327
-
1328
- - more universal stage container selector
1329
- - `mousewheel` event changed to `wheel`
1330
-
1331
- ## 0.11.1 - 2016-01-16
1332
-
1333
- ### Fixed
1334
-
1335
- - correct `Konva.Arrow` drawing. Now it works better.
1336
- - Better support for dragging when mouse out of stage
1337
- - Better corner radius for `Label` shape
1338
- - `contentTap` event for stage
1339
-
1340
- ### Added
1341
-
1342
- - event delegation. You can use it in this way: `layer.on('click', 'Circle', handler);`
1343
- - new `node.findAncestors(selector)` and `node.findAncestor(selector)` functions
1344
- - optional selector parameter for `stage.getIntersection` and `layer.getIntersection`
1345
- - show warning message if several instances of Konva are added to page.
1346
-
1347
- ### Changed
1348
-
1349
- - `moveTo` and some other methods return `this`
1350
- - `getAbsolutePosition` support optional relative parent argument (useful to find absolute position inside of some of parent nodes)
1351
- - `change` event will be not fired if changed value is the same as old value
1352
-
1353
- ## 0.10.0 - 2015-10-27
1354
-
1355
- ### Added
1356
-
1357
- - RGBA filter. Thanks to [@codefo](https://github.com/codefo)
1358
- - `stroke` and `fill` support for `Konva.Sprite`
1359
-
1360
- ### Fixed
1361
-
1362
- - Correct calculation in `getClientRect` method of `Konva.Line` and `Konva.Container`.
1363
- - Correct `toObject()` behaviour for node with attrs with extended native prototypes
1364
- - Fixed bug for caching where buffer canvas is required
1365
-
1366
- ### Changed
1367
-
1368
- - Dragging works much better. If your pointer is out of stage content dragging will still continue.
1369
- - `Konva.Node.create` now works with objects.
1370
- - `Konva.Tween` now supports tweening points to state with different length
1371
-
1372
- ## 0.9.5 - 2015-05-28
1373
-
1374
- ### Fixed
1375
-
1376
- - `to` will not throw error if no `onFinish` callback
1377
- - HDPI support for desktop
1378
- - Fix bug when filters are not correct for HDPI
1379
- - Fix bug when hit area is not correct for HDPI
1380
- - Fix bug for incorrect `getClientRect` calculation
1381
- - Repair fill gradient for text
1382
-
1383
- ### Changed
1384
-
1385
- - context wrapper is more capable with native context.
1386
- So you can use `context.fillStyle` property in your `sceneFunc` without accessing native context.
1387
- - `toDataURL` now handles pixelRatio. you can pass `config.pixelRatio` argument
1388
- - Correct `clone()` for custom nodes
1389
- - `FastLayer` can now have transforms
1390
- - `stage.toDataURL()` method now works synchronously. So `callback` argument is not required.
1391
- - `container.find(selector)` method now has a validation step. So if you forgot to add `#` or `.` you will see a warning message in the console.
1392
-
1393
- ### Added
1394
-
1395
- - new `Konva.Image.fromURL` method
1396
-
1397
- ### Deprecated
1398
-
1399
- - `fillRed`, `fillGreen`, `fillBlue`, `fillAlpha` are deprecated. Use `fill` instead.
1400
- - `strokeRed`, `strokeGreen`, `strokeBlue`, `strokeAlpha` are deprecated. Use `stroke` instead.
1401
- - `shadowRed`, `shadowGreen`, `shadowBlue`, `shadowAlpha` are deprecated. Use `shadow` instead.
1402
- - `dashArray` is deprecated. Use `dash` instead.
1403
- - `drawFunc` is deprecated. Use `sceneFunc` instead.
1404
- - `drawHitFunc` is deprecated. Use `hitFunc` instead.
1405
- - `rotateDeg` is deprecated. Use `rotate` instead.
1406
-
1407
- ## 0.9.0 - 2015-02-27
1408
-
1409
- ### Fixed
1410
-
1411
- - cache algorithm has A LOT OF updates.
1412
-
1413
- ### Changed
1414
-
1415
- - `scale` now affects `shadowOffset`
1416
- - performance optimization (remove some unnecessary draws)
1417
- - more expected drawing when shape has opacity, stroke and shadow
1418
- - HDPI for caching.
1419
- - Cache should work much better. Now you don't need to pass bounding box {x,y,width,height} to `cache` method for all buildin Konva shapes. (only for your custom `Konva.Shape` instance).
1420
- - `Tween` now supports color properties (`fill`, `stroke`, `shadowColor`)
1421
-
1422
- ### Added
1423
-
1424
- - new methods for working with node's name: `addName`, `removeName`, `hasName`.
1425
- - new `perfectDrawEnabled` property for shape. See [http://konvajs.org/docs/performance/Disable_Perfect_Draw.html](http://konvajs.org/docs/performance/Disable_Perfect_Draw.html)
1426
- - new `shadowForStrokeEnabled` property for shape. See [http://konvajs.org/docs/performance/All_Performance_Tips.html](http://konvajs.org/docs/performance/All_Performance_Tips.html)
1427
- - new `getClientRect` method.
1428
- - new `to` method for every node for shorter tweening
1429
-
1430
- ## 0.8.0 - 2015-02-04
1431
-
1432
- - Bug Fixes
1433
- - browser crashing on pointer events fixed
1434
- - optimized `getIntersection` function
1435
- - Enhancements
1436
- - `container.findOne()` method
1437
- - new `strokeHitEnabled` property. Useful for performance optimizations
1438
- - typescript definitions. see `/resources/konva.d.ts`
1439
-
1440
- ## Rebranding release 2015-01-28
1441
-
1442
- Differences from last official `KineticJS` release
1443
-
1444
- - Bug Fixes
1445
- - `strokeScaleEnabled = false` is disabled for text as I can not find a way to implement this
1446
- - `strokeScaleEnabled = false` for Line now creates a correct hit graph
1447
- - working "this-example" as name for nodes
1448
- - Konva.Text() with no config will not throw exception
1449
- - Konva.Line() with no config will not throw exception
1450
- - Correct stage resizing with `FastLayer`
1451
- - `batchDraw` method for `FastLayer`
1452
- - Correct mouseover/mouseout/mouseenter/mouseleave events for groups
1453
- - cache node before adding to layer
1454
- - `intersects` function now works for shapes with shadow
1455
-
1456
- - Enhancements
1457
- - `cornerRadius` of Rect is limited by `width/2` and `height/2`
1458
- - `black` is default fill for text
1459
- - true class extending. Now `rect instanceOf Konva.Shape` will return true
1460
- - while dragging you can redraw layer that is not under drag. hit graph will be updated in this case
1461
- - now you can move object that is dragging into another layer.
1462
- - new `frameOffsets` attribute for `Konva.Sprite`
1463
- - much better dragging performance
1464
- - `browserify` support
1465
- - applying opacity to cached node
1466
- - remove all events with `node.off()`
1467
- - mouse dragging only with left button
1468
- - opacity now affects cached shapes
1469
- - Label corner radius
1470
- - smart changing `width`, `height`, `radius` attrs for circle, start, ellipse, ring.
1471
- - `mousewheel` support. Thanks [@vmichnowicz](https://github.com/vmichnowicz)
1472
- - new Arrow plugin
1473
- - multiple names: `node.name('foo bar'); container.find('.foo');` (thanks [@mattslocum](https://github.com/mattslocum))
1474
- - `Container.findOne()`