@nasser-sw/fabric 7.0.1-beta8 → 7.0.1-beta9

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