41 KiB
Change Log
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
10.0.5 (2025-10-22)
- Simplify types to fix TS errors
10.0.4 (2025-10-21)
- Remove logs
10.0.3 (2025-10-21)
- Add text decoration options to TextPath: support for 'line-through' and combined styles with 'underline'
10.0.2 (2025-09-10)
- Fixed internal calculations for
TextPathto return correct width and height
10.0.1 (2025-09-09)
- Fixed
line-throughrender for center/right aligned text
10.0.0 (2025-09-07)
Breaking Changes
- 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:
// before
const Konva = require('konva');
// after
const Konva = require('konva').default;
- Breaking: Dropped default support for node.js environment. Now you have to explicitly import it:
npm install canvas
import Konva from 'konva';
import 'konva/canvas-backend';
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.
- 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.
New Features
- Added new
skiarender backend for node.js:
npm install skia-canvas
import Konva from 'konva';
import 'konva/skia-backend';
- 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).
node.filters(['blur(10px')]);
node.cache();
- New property
charRenderFuncforKonva.Textfor controlling "per-character-render". May be useful any character animations:
var text = new Konva.Text({
x: 10,
y: 10,
text: 'AB',
fontSize: 20,
charRenderFunc: function ({ context, index }) {
if (index === 1) {
// shift only the second character
context.translate(0, 10);
}
},
});
- New: Added
Konva.Filters.Brightnessfilter in replace of deprecatedKonva.Filters.Brightento better match with css filters logic. - Added
cornerRadiussupport forKonva.RegularPolygon - Added
miterLimitproperty support forKonva.Shapeto control line join appearance
Bug Fixes
- Fixed corner radius render for
Konva.Rectwhen negative width or height are used - Fixed TextPath rendering on right align for some fonts
- Fixed crash when node inside transformer was destroyed
- Fixed mouseup + click events order when clicked on empty area of stage
- Fixed transformer drag behavior with non-draggable nodes
Technical Improvements
- Performance: Rewrote Emboss and Solarize filters for improved performance and usability
- Changed return type of
node.toImage() - Brave detection and warning
9.3.22 (2025-07-08)
- Fixed possible crash on
node.to()method
9.3.21 (2025-07-07)
- Fixed memory leaks on Tween destroy
- Fixed incorrect export of stage/layer when internal nodes used buffer canvas for rendering
- Fixed incorrect render of cached node when buffer canvas is used
- Fixed incorrect path lenth calculations
- Fixed
pointerleavebubbling - Added
pointerleaveevent inStage
9.3.20 (2025-03-20)
- Fix text rendering when ellipses are used
9.3.19 (2025-03-12)
- Typescript fixes
- Memory leak fixes
9.3.18 (2024-12-23)
- Fixed emoji split in multiple lines
9.3.17 (2024-12-23)
- Fixed
Arrow.getClientRect() - Fixed emoji rendering with letterSpacing
- Fixed line-through for justify text
- Changes in letter spacing width calculations to match DOM rendering
9.3.16 (2024-10-21)
- Fix freeze on ios on touch cancel event
- Typescript fixes
9.3.15 (2024-09-09)
- fix letter spacing for Hindi text
- ts fixes
9.3.14 (2024-07-16)
- Fix shadow + corner radius for images
- Support
fillRuleforKonva.Shapeon hit graph
9.3.13 (2024-07-05)
- Fallback for
Konva.Text.measureSize()when 2d context doesn't return full data
9.3.12 (2024-06-20)
- Fix stopped transforming when it was triggered by multi-touch
- Fix svg
path.getPointAtLength()calculations in some cases - Fix
shape.getClientRect()when any of parents is cached
9.3.11 (2024-05-23)
- Fix chrome clear canvas issue
- Typescript fixes
9.3.9 (2024-05-20)
- Fix underline and line-through for
Konva.TextwhenKonva._fixTextRendering = true
9.3.8 (2024-05-15)
- Fix click events fires on stage
- Temporary
Konva._fixTextRendering = trueflag to fix inconsistent text
9.3.6 (2024-03-04)
- Fix transformer bug to enable hit graph back
9.3.5 (2024-03-04)
tranformerevent will be triggered AFTER all data of transformer is updated- Improve performance of transformer
9.3.4 (2024-03-03)
- Fix clipping with zero size
9.3.3 (2024-02-09)
- Another fix for exporting buffered shapes
9.3.2 (2024-01-26)
- Fix large memory usage on node export
9.3.1 (2024-01-17)
- Fix Pixelate filter work/fix caching size
- Fix node export when large buffer canvas is used
9.3.0 (2023-12-20)
- New attribute
rotateLineVisibleforKonva.Transformerto show/hide rotate line
9.2.3 (2023-10-31)
- Better
Konva.Transformerwork when it hasflipEnabled = false.
9.2.2 (2023-09-14)
- Better RTL support
- Some typescript fixes
9.2.1 (2023-09-14)
- Fix text rendering when text has both underline and shadow
- Typescript fixes
9.2.0 (2023-05-14)
- More controls on clipping
fillRuleforKonva.Shape
9.1.0 (2023-05-14)
- New
anchorStyleFuncforKonva.Transformerto customize anchor style
9.0.2 (2023-05-14)
- Better text rendering when it has stroke
9.0.1 (2023-04-17)
- Better performance for any instance creation
- Little typescript fixes
9.0.0 (2023-04-13)
- Migrate the npm package from ES back to CommonJS
8.4.4 (2023-04-05)
- Some fixes for
Konva.TextPathcalculations and rendering. - Resolve "willReadFrequently" warning in Chrome
8.4.3 (2023-03-23)
- Typescript fixes
- Better validation for
Konva.Transfomernodesproperty
8.4.2 (2023-01-20)
- Fix justify on text with limited height
8.4.1 (2023-01-19)
- Typescript fixes for
container.add()method. Ability to use empty array as argument. E.g.container.add(...emptyArray) - Fix underline for justify text
- Fix gradient display on underline or line-through text
8.4.0 (2023-01-05)
- Add support for
cornerRadiusfor Konva.Image - Fix cloning of
Konva.Transformer
8.3.14 (2022-11-09)
- Automatically release (destroy) used canvas elements. Should fix safari memory issues
8.3.13 (2022-10-03)
- Typescript fixes
- Better non-passive events usage
- Better 2d context usage to avoid Chrome warnings
8.3.12 (2022-08-29)
ellipsisfixes forKonva.Text- Allow reset component attributes via overloader
8.3.11 (2022-08-05)
- Fix
Konva.Labelposition when tag attributes are changed - Fix incorrect ellipsis display for
Konva.Text - Fix
clickevent trigger on parent containers on touch devices - Fix incorrect
mouseleaveevent trigger when drag is finished
8.3.10 (2022-06-20)
- Skip
Konva.Transformerincontainer.getClientRect()calculations
8.3.9 (2022-05-27)
- Typescript fixes
8.3.8 (2022-05-05)
- Disable all exports in
package.json
8.3.7 (2022-05-04)
- Migrate to CommonJS exports only
8.3.6 (2022-04-27)
- Better exports definitions. Importing
Konvashould work better in different bundlers and test environments. imageSmoothingEnabledoption fornode.toDataURL(),node.toCanvas()andnode.toImage()
8.3.5 (2022-03-21)
- Quick fix for
toCanvas()andtoDataURL()size calculation.
8.3.4 (2022-03-13)
- Fix characters positions calculations on
fontFamilychanges inTextPath. - Remove rounding in
node.getClientRect()results - Fix event object on
transformstartevent.
8.3.3 (2022-02-23)
- Fix
justifyalign for text with several paragraphs.
8.3.2
- Remove source maps for webpack builds
8.3.1 (2021-12-09)
- Fix
dbltapevent in Safari - A bit faster
node.moveToTop()when node is already on top - Better client rect calculations for
Konva.Arcshape.
8.3.0 (2021-11-15)
- new
transformer.anchorDragBoundFuncmethod.
8.2.4 (2021-11-15)
- Fix not working
Konva.Transformerwhen several transformers were used
8.2.2
- Fix
Konva.Arrowrendering when it has two pointers
8.2.1
- Fix
package.jsonexports.
8.2.0
- Restore build in CommonJS.
const Konva = require('konva/cmj').default; - Fix arrow rendering when dash is used
- Fix
dbltaptrigger when multi-touch is used
8.1.4
- Fix
dblclickevent whencancelBubbleis used.
8.1.3
- Fix
fillPatterncache invalidation on shapes
8.1.2
- Fix memory leak for
Konva.Image
8.1.1
- Fix
Konva.Transformerdragging draw whenshouldOverdrawWholeArea = true. - Fix auto redraw when
container.removeChildren()orcontainer.destroyChildren()are used
8.1.0
- New property
useSingleNodeRotationforKonva.Transformer.
8.0.4
- Fix fill pattern updates on
fillPatternXandfillPatternYchanges.
8.0.2
- Fix some transform caches
- Fix cache with hidden shapes
8.0.1
- Some typescript fixes
8.0.0
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.
BREAKING:
Konva.Collectionis removed.container.childrenis a simple array now.container.find()will returns an array instead ofKonva.Collection()instance.Konva.Collectionwas 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.
// old code:
group.find('Shape').visible(false);
// new code:
group.find('Shape').forEach((shape) => shape.visible(false));
- argument
selectoris removed fromnode.getIntersection(pos)API. I don't think you even knew about it. Konva.Util.extendis removed.- All "content" events from
Konva.Stageare removed. E.g. instead ofcontentMousemovejust usemousemoveevent.
New features:
- All updates on canvas will do automatic redraw with
layer.batchDraw(). This features is configurable withKonva.autoDrawEnabledproperty. Konva will automatically redraw layer when you change any property, remove or add nodes, do caching. So you don't need to calllayer.draw()orlayer.batchDraw()in most of the cases. - New method
layer.getNativeCanvasElement() - new
flipEnabledproperty forKonva.Transformer - new
node.isClientRectOnScreen()method - Added
Konva.Util.degToRadandKonva.Util.radToDeg - Added
node.getRelativePointerPosition()
Changes and fixes:
- Full migration to ES modules package (!), commonjs code is removed.
konva-nodeis merged intokonvanpm package. One package works for both environments.- Full event system rewrite. Much better
pointerevents support. - Fix
TextPathrecalculations onfontSizechange - Better typescript support. Now every module has its own
*.d.tsfile. - Removed
Konva.UA,Konva._parseUA(it was used for old browser detection) - Fixed Arrow head position when an arrow has tension
textPath.getKerning()is removed- Fix
acommand parsing forKonva.Path - Fix fill pattern for
Konva.Textwhen the pattern has an offset or rotation Konva.namesandKonva.idsare removedKonva.captureTouchEventsEnabledis renamed toKonva.capturePointerEventsEnabled
7.2.5
- Fix transform update on
letterSpacingchange ofKonva.Text
7.2.4
- Fix wrong
mouseleavetrigger forKonva.Stage
7.2.3
- Fix transformer rotation when parent of a node is rotated too.
7.2.2
- Fix wrong size calculations for
Konva.Linewith tension - Fix
shape.intersects()behavior when a node is dragged - Fix ellipsis rendering for
Konva.Text
7.2.1
- Fix correct rendering of
Konva.Labelwhen heigh of text is changed - Fix correct
transformstartandtransformendevents when several nodes are attached withKonva.Transformer
7.2.0
- New property
fillAfterStrokeEnabledforKonva.Shape. See API docs for more information. - Fix for
Konva.Transformerwhen it may fail to draw. - Fix rendering of
TextPathone more time.
7.1.9
- Fix autodrawing for
Konva.Transformerwhen it is on a different layer - Fix
Konva.RegularPolygonsize calculations.
7.1.8
- Fix incorrect rendering of
TextPathin some cases. (again)
7.1.7
- Fix incorrect rendering of
TextPathin some cases.
7.1.6
- Fix for correct image/dataURL/canvas exports for
Konva.Stage.
7.1.5
- Performance fixes for dragging many nodes with
Konva.Transformer. - Documentation updates
7.1.4
- Perf fixes
- Change events trigger flow, so adding new events INSIDE event callback will work correctly.
- Fix double
dragend,dragstart,dragmovetriggers onKonva.Transformer
7.1.3
- Text rendering fixes
7.1.2
- fix ellipses behavior for
Konva.Text. - fix scaled fill pattern for text.
7.1.1
- fixes for
dragstartevent whenKonva.Transformeris used.dragstartevent will have correct nativeevtreference - Better unicode support in
Konva.TextandKonva.TextPath. Emoji should work better now 👍
7.1.0
- Multi row support for
ellipsisconfig forKonva.Text - Better
Konva.Transfomerbehavior when single attached node is programmatically rotated.
7.0.7
- fixes for
dragstartevent whenKonva.Transformeris used.dragstartwill not bubble from transformer. stringandfillproperties validation can acceptCanvasGradientas valid value
7.0.6
- Better performance for stage dragging
7.0.5
- Fixes for
node.cache()function.
7.0.4
- Add
onUpdatecallbacks toKonva.Tweenconfiguration andnode.to()method. - Up to 6x faster initializations of objects, like
const shape = new Konva.Shape().
7.0.3 - 2020-07-09
- Fix wring
dragendtrigger ondraggableproperty change insideclick - Fix incorrect text rendering with
letterSpacing !== 0 - Typescript fixes
7.0.2 - 2020-06-30
- Fix wrong trigger
dbltapandclickon mobile
7.0.1 - 2020-06-29
- Fixes for different font families support.
- Fixes for
Konva.Transformerpositions - Types fixes for better Typescript support
7.0.0 - 2020-06-23
- BREAKING
inheritoption is removed fromvisibleandlistening. They now just have boolean valuestrueorfalse. If you dogroup.listening(false);then whole group and all its children will be removed from the hitGraph (and they will not listen to events). Probably 99%Konvaapplications will be not affected by this breaking change. - Many performance fixes and code size optimizations. Up to 70% performance boost for many moving nodes.
layer.hitGraphEnabled()is deprecated. Just uselayer.listening(false)instead- Better support for font families with spaces inside (like
Font Awesome 5). - Fix wrong
dblclickanddbltaptriggers - Deprecate
Konva.FastLayer. Usenew Konva.Layer({ listening: false });instead. dragmoveevent will be fired onKonva.Transformertoo when you drag a node.dragmovetriggers only after ALL positions of dragging nodes are changed
6.0.0 - 2020-05-08
- BREAKING!
boundBoxFuncofKonva.Transformerworks in absolute coordinates of whole transformer. Previously in was working in local coordinates of transforming node. - Many
Konva.Transformerfixes. Now it works correctly when you transform several rotated shapes. - Fix for wrong
mouseleaveandmouseoutfire on shape remove/destroy.
5.0.3 - 2020-05-01
- Fixes for
boundBoxFuncofKonva.Transformer.
5.0.2 - 2020-04-23
- Deatach fixes for
Konva.Transformer
5.0.1 - 2020-04-22
- Fixes for
Konva.Transformerwhen parent scale is changed - Fixes for
Konva.Transformerwhen parent is draggable - Performance optimizations
5.0.0 - 2020-04-21
- New
Konva.Transformerimplementation!. Old API should work. But I marked this release ismajor(breaking) just for smooth updates. Changes:- Support of transforming multiple nodes at once:
tr.nodes([shape1, shape2]). tr.node(),tr.setNode(),tr.attachTo()methods are deprecated. Usetr.nodes(array)instead- Fixes for center scaling
- Fixes for better
paddingsupport Transformercan be placed anywhere in the tree of a stage tree (NOT just inside a parent of attached node).
- Support of transforming multiple nodes at once:
- Fix
imageSmoothEnabledresets when stage is resized - Memory usage optimizations when a node is cached
4.2.2 - 2020-03-26
- Fix hit stroke issues
4.2.1 - 2020-03-26
- Fix some issues with
mouseenterandmouseleaveevents. - Deprecate
hitStrokeEnabledproperty - Fix rounding issues for
getClientRect()for some shapes
4.2.0 - 2020-03-14
- Add
rotationSnapToleranceproperty toKonva.Transformer. - Add
getActiveAnchor()method toKonva.Transformer - Fix hit for non-closed
Konva.Path - Some fixes for experimental Offscreen canvas support inside a worker
4.1.6 - 2020-02-25
- Events fixes for
Konva.Transformer - Now
Konvawill keepidin a cloned node - Better error messages on tainted canvas issues
4.1.5 - 2020-02-16
- Fixes for
path.getClientRect()function calculations
4.1.4 - 2020-02-10
- Fix wrong internal caching of absolute attributes
- Fix
Konva.Transformerbehavior on scaled with CSS stage
4.1.3 - 2020-01-30
- Fix line with tension calculations
- Add
node.getAbsoluteRotation()method - Fix cursor on anchors for rotated parent
4.1.2 - 2020-01-08
- Fix possible
NaNin content calculations
4.1.1 - 2020-01-07
- Add ability to use
width = 0andheight = 0forKonva.Image. - Fix
cache()method ofKonva.Arrow() - Add
TransformtoKonvadefault exports. SoKonva.Transformis available now.
4.1.0 - 2019-12-23
- Make events work on some CSS transforms
- Fix caching on float dimensions
- Fix
mouseleaveevent on stage. - Increase default anchor size for
Konva.Transformeron touch devices
4.0.18 - 2019-11-20
- Fix
path.getClientRect()calculations forKonva.Path - Fix wrong fire of
clickandtapevents on stopped drag events.
4.0.17 - 2019-11-08
- Allow hitStrokeWidth usage, even if a shape has not stroke visible
- Better IE11 support
4.0.16 - 2019-10-21
- Warn on undefined return value of
dragBoundFunc. - Better calculations for
container.getClientRect()
4.0.15 - 2019-10-15
- TS fixes
- Better calculations for
TextPathwith align = right - Better
textPath.getClientRect()
4.0.14 - 2019-10-11
- TS fixes
- Fix globalCompositeOperation + cached hit detections.
- Fix absolute position calculations for cached parent
4.0.13 - 2019-10-02
- Fix
line.getClientRect()calculations for line with a tension or low number of points
4.0.12 - 2019-09-17
- Fix some bugs when
Konva.Transformerhaspadding > 0
4.0.10 - 2019-09-10
- Fix drag position handling
- Fix multiple selector for find() method
4.0.9 - 2019-09-06
- Fix
Konva.Transformerbehavior on mirrored nodes - Fix
stage.getPointerPosition()logic.
4.0.8 - 2019-09-05
- Fix
dragendevent on click - Revert fillPatternScale for text fix.
4.0.7 - 2019-09-03
- Fixed evt object on
dragstart - Fixed double tap trigger after dragging
4.0.6 - 2019-08-31
- Fix fillPatternScale for text
4.0.5 - 2019-08-17
- Fix
dragstartflow whennode.startDrag()is called. - Fix
tapanddbltapdouble trigger on stage
4.0.4 - 2019-08-12
- Add
node.isCached()method - Fix nested dragging bug
4.0.3 - 2019-08-08
- Slightly changed
mousemoveevent flow. It triggers for firstmouseoverevent too - Better
Konva.hitOnDragEnabledsupport for mouse inputs
4.0.2 - 2019-08-08
- Fixed
node.startDrag()behavior. We can call it at any time.
4.0.1 - 2019-08-07
- Better
Konva.Arrow+ tension drawing - Typescript fixes
4.0.0 - 2019-08-05
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.
- Better multi-touch support. Now we can trigger several
touchevents on one or many nodes. - New drag&drop implementation. You can drag several shapes at once with several pointers.
- HSL colors support
3.4.1 - 2019-07-18
- Fix wrong double tap trigger
3.4.0 - 2019-07-12
- TS types fixes
- Added support for different values for
cornerRadiusofKonva.Rect
3.3.3 - 2019-06-07
- Some fixes for better support
konva-node - TS types fixes
3.3.2 - 2019-06-03
- TS types fixes
3.3.1 - 2019-05-28
- Add new property
imageSmoothingEnabledto the node caching - Even more ts fixes. Typescript need a lot of attention, you know...
3.3.0 - 2019-05-28
- Enable strict mode for ts types
- Add new property
imageSmoothingEnabledto the layer
3.2.7 - 2019-05-27
- Typescript fixes
- Experimental pointer events support. Do
Konva._pointerEventsEnabled = true;to enable - Fix some
Konva.Transformerbugs.
3.2.6 - 2019-05-09
- Typescript fixes again
3.2.5 - 2019-04-17
- Show a warning when
Konva.Transformerand attaching node have different parents. - Typescript fixes
3.2.4 - 2019-04-05
- Fix some stage events.
mouseenterandmouseleaveshould work correctly on empty spaces - Fix some typescript types
- Better detection of production mode (no extra warnings)
3.2.3 - 2019-03-21
- Fix
hasNamemethod for empty name cases
3.2.2 - 2019-03-19
- Remove
dependenciesfrom npm package
3.2.1 - 2019-03-18
- Better
findandfindOnelookup. Now we should not care about duplicate ids. - Better typescript definitions
3.2.0 - 2019-03-10
- new property
shape.hitStrokeWidth(10) - Better typescript definitions
- Remove
Object.assignusage (for IE11 support)
3.1.7 - 2019-03-06
- Better modules and TS types
3.1.6 - 2019-02-27
- Fix commonjs exports
- Fix global injections
3.1.0 - 2019-02-27
- Make
Konvamodular:import Konva from 'konva/lib/Core';; - Fix incorrect
Transformerbehavior - Fix drag&drop for touch devices
3.0.0 - 2019-02-25
Breaking
Customs builds are temporary removed from npm package. You can not use import Konva from 'konva/src/Core';.
This feature will be added back later.
Possibly breaking
That changes are private and internal specific. They should not break most of Konva apps.
Konva.Util.addMethodsis removedKonva.Util._removeLastLetteris removedKonva.Util._getImageis removedKonv.Util._getRGBAStringis removedKonv.Util._mergeis removed- Removed polyfill for
requestAnimationFrame. idandnameproperties defaults are empty strings, notundefined- internal
_cacheproperty was updated to use es2015Mapinstead of{}. Konva.Validatorsis removed.
Added
- Show a warning when a stage has too many layers
- Show a warning on duplicate ids
- Show a warning on weird class in
Node.createparsing from JSON - Show a warning for incorrect value for component setters.
- Show a warning for incorrect value for
zIndexproperty. - Show a warning when user is trying to reuse destroyed shape.
- new publish method
measureSize(string)forKonva.Text - You can configure what mouse buttons can be used for drag&drop. To enable right button you can use
Konva.dragButtons = [0, 1]. - Now you can hide stage
stage.visible(false). It will set its container display style to "none". - New method
stage.setPointersPositions(event). Usually you don't need to use it manually. - New method
layer.toggleHitCanvas()to show and debug hit areas
Changed
- Full rewrite to Typescript with tons of refactoring and small optimizations. The public API should be 100% the same
- Fixed
patternImageandradialGradientforKonva.Text Konva.Util._isObjectis renamed toKonva.Util._isPlainObject.- A bit changed behavior of
removeId(private method), now it doesn't clear node ref, if object is changed. - simplified
batchDrawmethod (it doesn't useKonva.Animation) now. - Performance improvements for shapes will image patterns, linear and radial fills
text.getTextHeight()is deprecated. Usetext.height()ortext.fontSize()instead.- Private method
stage._setPointerPosition()is deprecated. Usestage.setPointersPositions(event);
Fixed
- Better mouse support on mobile devices (yes, that is possible to connect mouse to mobile)
- Better implementation of
mouseoverevent for stage - Fixed underline drawing for text with
lineHeight !== 1 - Fixed some caching behavior when a node has
globalCompositeOperation. - Fixed automatic updates for
Konva.Transformer - Fixed container change for a stage.
- Fixed warning for
widthandheightattributes forKonva.Text - Fixed gradient drawing for
Konva.Text - Fixed rendering with
strokeWidth = 0
2.6.0 - 2018-12-14
Changed
- Performance fixes when cached node has many children
- Better drawing for shape with
strokeScaleEnabled = falseon HDPI devices
Added
- New
ignoreStrokeforKonva.Transformer. Good to use when a shape hasstrokeScaleEnabled = false
Changed
getKerningTextPath API is deprecated. UsekerningFuncinstead.
2.5.1 - 2018-11-08
Changed
- Use custom functions for
trimRightandtrimLeft(for better browsers support)
2.5.0 - 2018-10-24
Added
- New
anchorCornerRadiusforKonva.Transformer
Fixed
- Performance fixes for caching
Changed
dragstartevent behavior is a bit changed. It will fire BEFORE actual position of a node is changed.
2.4.2 - 2018-10-12
Fixed
- Fixed a wrong cache when a shape inside group has
listening = false
2.4.1 - 2018-10-08
Changed
- Added some text trim logic to wrap in better
Fixed
getClientRectfor complex paths fixesgetClientRectcalculation fix for groups- Update
Konva.TransformeronrotateEnabledchange - Fix click stage event on dragend
- Fix some Transformer cursor behavior
2.4.0 - 2018-09-19
Added
- Centered resize with ALT key for
Konva.Transformer - New
centeredScalingforKonva.Transformer
Fixed
- Tween support for gradient properties
- Add
user-select: noneto the stage container to fix some "selected contend around" issues
2.3.0 - 2018-08-30
Added
- new methods
path.getLength()andpath.getPointAtLength(val) verticalAlignforKonva.Text
2.2.2 - 2018-08-21
Changed
- Default duration for tweens and
node.to()methods is now 300ms - Typescript fixes
- Automatic validations for many attributes
2.2.1 - 2018-08-10
Added
- New properties for
Konva.Transformer:borderStroke,borderStrokeWidth,borderDash,anchorStroke,anchorStrokeWidth,anchorSize.
Changed
- Some properties of
Konva.Transformerare renamed.lineEnabled->borderEnabled.rotateHandlerOffset->rotateAnchorOffset,enabledHandlers->enabledAnchors.
2.1.8 - 2018-08-01
Fixed
- Some
Konva.Transformerfixes - Typescript fixes
stage.toDataURL()fixes when it has hidden layersshape.toDataURL()automatically adjust position and size of resulted image
2.1.7 - 2018-07-03
Fixed
toObjectfixes
2.1.7 - 2018-07-03
Fixed
- Some drag&drop fixes
2.1.6 - 2018-06-16
Fixed
- Removed wrong dep
- Typescript fixes
2.1.5 - 2018-06-15
Fixed
- Typescript fixes
- add shape as second argument for
sceneFuncandhitFunc
2.1.4 - 2018-06-15
Fixed
- Fixed
Konva.Textjustify drawing for a text with decoration - Added methods
data(),setData()andgetData()methods toKonva.TextPath - Correct cache reset for
Konva.Transformer
2.1.3 - 2018-05-17
Fixed
Konva.Transformerautomatically track shape changesKonva.Transformerworks with shapes with offset too
2.1.2 - 2018-05-16
Fixed
- Cursor fixes for
Konva.Transformer - Fixed lineHeight behavior for
Konva.Text - Some performance optimizations for
Konva.Text - Better wrap algorithm for
Konva.Text - fixed
Konva.Arrowwith tension != 0 - Some fixes for
Konva.Transformer
2.0.3 - 2018-04-21
Added
- Typescript defs for
Konva.Transformer - Typescript defs for
globalCompositeOperation
Changes
- Fixed flow for
contextmenuevent. Now it will be triggered on shapes too find()method for Containers can use a function as a parameter
Fixed
- some bugs fixes for
group.getClientRect() Konva.Arrowwill not draw dash for pointers- setAttr will trigger change event if new value is the same Object
- better behavior of
dblclickevent when you click fast on different shapes stage.toDataURLwill usepixelRatio = 1by default.
2.0.2 - 2018-03-15
Fixed
- Even more bugs fixes for
Konva.Transformer
2.0.1 - 2018-03-15
Fixed
- Several bugs fixes for
Konva.Transformer
2.0.0 - 2018-03-15
Added
- new
Konva.Transformer. It is a special group that allow simple resizing and rotation of a shape. - Add ability to remove event by callback
node.off('event', callback). - new
Konva.Filters.Contrast. - new
Konva.Util.haveIntersection()to detect simple collusion - add
Konva.Text.ellipsisto add '…' to text string if width is fixed and wrap is set to 'none' - add gradients for strokes
Changed
- stage events are slightly changed.
mousedown,click,mouseup,dblclick,touchstart,touchend,tap,dbltapwill be triggered when clicked on empty areas too
Fixed
- Some typescript fixes
- Pixelate filter fixes
- Fixes for path data parsing
- Fixed shadow size calculation
Removed
- Some deprecated methods are removed. If previous version was working without deprecation warnings for you, this one will work fine too.
1.7.6 - 2017-11-01
Fixed
- Some typescript fixes
1.7.4 - 2017-10-30
Fixed
isBrowserdetection for electron
1.7.3 - 2017-10-19
Changed
- Changing size of a stage will redraw it in synchronous way
Fixed
- Some fixes special for nodejs
1.7.2 - 2017-10-11
Fixed
- Fixed
Konva.document is undefined
1.7.1 - 2017-10-11
Changed
- Konva for browser env and Konva for nodejs env are separate packages now. You can use
konva-nodefor NodeJS env.
1.7.0 - 2017-10-08
Fixed
- Several typescript fixes
Changed
- Default value for
dragDistanceis changed to 3px. - Fix rare error throw on drag
- Caching with height = 0 or width = 0 with throw async error. Caching will be ignored.
1.6.8 - 2017-08-19
Changed
- The
node.getClientRect()calculation is changed a bit. It is more powerfull and correct. Also it takes parent transform into account. See docs. - Upgrade nodejs deps
1.6.7 - 2017-07-28
Fixed
- Fix bug with double trigger wheel in Firefox
- Fix
node.getClientRect()calculation in a case of Group + invisible child - Fix dblclick issue https://github.com/konvajs/konva/issues/252
1.6.3 - 2017-05-24
Fixed
- Fixed bug with pointer detection. css 3d transformed stage will not work now.
1.6.2 - 2017-05-08
Fixed
- Fixed bug with automatic shadow for negative scale values
1.6.1 - 2017-04-25
Fixed
- Fix pointer position detection
Changed
- moved
globalCompositeOperationproperty toKonva.Node
1.6.0 - 2017-04-21
Added
- support of globalCompositeOperation for
Konva.Shape
Fixed
- getAllIntersections now works ok for Text shapes (https://github.com/konvajs/konva/issues/224)
Changed
- 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
1.5.0 - 2017-03-20
Added
- support for
lineDashOffsetproperty forKonva.Shape.
1.4.0 - 2017-02-07
Added
textDecorationofKonva.Textnow supportsline-through
1.3.0 - 2017-01-10
Added
- new align value for
Konva.TextandKonva.TextPath:justify - new property for
Konva.TextandKonva.TextPath:textDecoration. Right now it sports only '' (no decoration) and 'underline' values. - new property for
Konva.Text:letterSpacing - new event
contentContextmenuforKonva.Stage alignsupport forKonva.TextPath- new method
toCanvas()for converting a node into canvas element
Changed
- changing a size of
Konva.Stagewill update it in async way (viabatchDraw). shadowOffsetrespect pixel ratio now
Fixed
- Fixed bug when
Konva.Tagwidth was not changing its width dynamically - Fixed "calling remove() for dragging shape will throw an error"
- Fixed wrong opacity level for cached group with opacity
- More consistent shadows on HDPI screens
- Fixed memory leak for nodes with several names
1.2.2 - 2016-09-15
Fixed
- refresh stage hit and its
dragend getClientRectcalculations
1.2.0 - 2016-09-15
Added
- new properties for
Konva.TextPath:letterSpacingandtextBaseline.
1.1.4 - 2016-09-13
Fixed
- Prevent throwing an error when text property of
Konva.Text= undefined or null
1.1.3 - 2016-09-12
Changed
- Better hit function for
TextPath. - Validation of
Shapefilters.
1.1.2 - 2016-09-10
Fixed
- Fixed "Dragging Group on mobile view throws "missing preventDefault" error" #169
1.1.1 - 2016-08-30
Fixed
- Fixed #166 bug of drag&drop
1.1.0 - 2016-08-21
Added
- new property of
Konva.Shape-preventDefault.
1.0.3 - 2016-08-14
Fixed
- Fixed some typescript definitions
1.0.2 - 2016-07-08
Changed
Konva.Textwill interpret undefinedwidthandheightasAUTO
1.0.1 - 2016-07-05
Changed
- you can now unset property by
node.x(undefined)ornode.setAttr('x', null)
Fixed
- Bug fix for case when
touchendevent throws error
1.0.0 - 2016-07-05
Fixed
- Bug fix for case when
touchendevent throws error
0.15.0 - 2016-06-18
Added
- Custom clip function
0.14.0 - 2016-06-17
Fixed
- fixes in typescript definitions
- fixes for bug with
mouseenterevent on deep nesting case
0.13.9 - 2016-05-14
Changed
- typescript definition in npm package
- node@5.10.1, canvas@1.3.14, jsdom@8.5.0 support
Konva.Pathwill be filled when it is not closedAnimation.start()will not not immediate sync draw. This should improve performance a little.- Warning when node for
Tweenis not in layer yet. removeChildren()remove only first level children. So it will not remove grandchildren.
0.12.4 - 2016-04-19
Changed
batchDrawwill do not immediatedraw()
Fixed
- fix incorrect shadow offset on rotation
0.12.3 - 2016-04-07
Fixed
batchDrawfunction works less time now- lighter npm package
0.12.2 - 2016-03-31
Fixed
- repair
cancelBubbleevent property behaviour - fix wrong
PathgetClientRect()calculation - better HDPI support
- better typescript definitions
- node 0.12 support
Changed
- more universal stage container selector
mousewheelevent changed towheel
0.11.1 - 2016-01-16
Fixed
- correct
Konva.Arrowdrawing. Now it works better. - Better support for dragging when mouse out of stage
- Better corner radius for
Labelshape contentTapevent for stage
Added
- event delegation. You can use it in this way:
layer.on('click', 'Circle', handler); - new
node.findAncestors(selector)andnode.findAncestor(selector)functions - optional selector parameter for
stage.getIntersectionandlayer.getIntersection - show warning message if several instances of Konva are added to page.
Changed
moveToand some other methods returnthisgetAbsolutePositionsupport optional relative parent argument (useful to find absolute position inside of some of parent nodes)changeevent will be not fired if changed value is the same as old value
0.10.0 - 2015-10-27
Added
- RGBA filter. Thanks to @codefo
strokeandfillsupport forKonva.Sprite
Fixed
- Correct calculation in
getClientRectmethod ofKonva.LineandKonva.Container. - Correct
toObject()behaviour for node with attrs with extended native prototypes - Fixed bug for caching where buffer canvas is required
Changed
- Dragging works much better. If your pointer is out of stage content dragging will still continue.
Konva.Node.createnow works with objects.Konva.Tweennow supports tweening points to state with different length
0.9.5 - 2015-05-28
Fixed
towill not throw error if noonFinishcallback- HDPI support for desktop
- Fix bug when filters are not correct for HDPI
- Fix bug when hit area is not correct for HDPI
- Fix bug for incorrect
getClientRectcalculation - Repair fill gradient for text
Changed
- context wrapper is more capable with native context.
So you can use
context.fillStyleproperty in yoursceneFuncwithout accessing native context. toDataURLnow handles pixelRatio. you can passconfig.pixelRatioargument- Correct
clone()for custom nodes FastLayercan now have transformsstage.toDataURL()method now works synchronously. Socallbackargument is not required.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.
Added
- new
Konva.Image.fromURLmethod
Deprecated
fillRed,fillGreen,fillBlue,fillAlphaare deprecated. Usefillinstead.strokeRed,strokeGreen,strokeBlue,strokeAlphaare deprecated. Usestrokeinstead.shadowRed,shadowGreen,shadowBlue,shadowAlphaare deprecated. Useshadowinstead.dashArrayis deprecated. Usedashinstead.drawFuncis deprecated. UsesceneFuncinstead.drawHitFuncis deprecated. UsehitFuncinstead.rotateDegis deprecated. Userotateinstead.
0.9.0 - 2015-02-27
Fixed
- cache algorithm has A LOT OF updates.
Changed
scalenow affectsshadowOffset- performance optimization (remove some unnecessary draws)
- more expected drawing when shape has opacity, stroke and shadow
- HDPI for caching.
- Cache should work much better. Now you don't need to pass bounding box {x,y,width,height} to
cachemethod for all buildin Konva shapes. (only for your customKonva.Shapeinstance). Tweennow supports color properties (fill,stroke,shadowColor)
Added
- new methods for working with node's name:
addName,removeName,hasName. - new
perfectDrawEnabledproperty for shape. See http://konvajs.org/docs/performance/Disable_Perfect_Draw.html - new
shadowForStrokeEnabledproperty for shape. See http://konvajs.org/docs/performance/All_Performance_Tips.html - new
getClientRectmethod. - new
tomethod for every node for shorter tweening
0.8.0 - 2015-02-04
- Bug Fixes
- browser crashing on pointer events fixed
- optimized
getIntersectionfunction
- Enhancements
container.findOne()method- new
strokeHitEnabledproperty. Useful for performance optimizations - typescript definitions. see
/resources/konva.d.ts
Rebranding release 2015-01-28
Differences from last official KineticJS release
-
Bug Fixes
strokeScaleEnabled = falseis disabled for text as I can not find a way to implement thisstrokeScaleEnabled = falsefor Line now creates a correct hit graph- working "this-example" as name for nodes
- Konva.Text() with no config will not throw exception
- Konva.Line() with no config will not throw exception
- Correct stage resizing with
FastLayer batchDrawmethod forFastLayer- Correct mouseover/mouseout/mouseenter/mouseleave events for groups
- cache node before adding to layer
intersectsfunction now works for shapes with shadow
-
Enhancements
cornerRadiusof Rect is limited bywidth/2andheight/2blackis default fill for text- true class extending. Now
rect instanceOf Konva.Shapewill return true - while dragging you can redraw layer that is not under drag. hit graph will be updated in this case
- now you can move object that is dragging into another layer.
- new
frameOffsetsattribute forKonva.Sprite - much better dragging performance
browserifysupport- applying opacity to cached node
- remove all events with
node.off() - mouse dragging only with left button
- opacity now affects cached shapes
- Label corner radius
- smart changing
width,height,radiusattrs for circle, start, ellipse, ring. mousewheelsupport. Thanks @vmichnowicz- new Arrow plugin
- multiple names:
node.name('foo bar'); container.find('.foo');(thanks @mattslocum) Container.findOne()