Changelog
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.Collection
is removed. container.children
is a simple array now. container.find()
will returns an array instead of Konva.Collection()
instance.
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.// old code:
group.find('Shape').visible(false);
// new code:
group.find('Shape').forEach((shape) => shape.visible(false));
selector
is removed from node.getIntersection(pos)
API. I don't think you even knew about it.Konva.Util.extend
is removed.Konva.Stage
are removed. E.g. instead of contentMousemove
just use mousemove
event.New features:
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.layer.getNativeCanvasElement()
flipEnabled
property for Konva.Transformer
node.isClientRectOnScreen()
methodKonva.Util.degToRad
and Konva.Util.radToDeg
node.getRelativePointerPosition()
Changes and fixes:
konva-node
is merged into konva
npm package. One package works for both environments.pointer
events support.TextPath
recalculations on fontSize
change*.d.ts
file.Konva.UA
, Konva._parseUA
(it was used for old browser detection)textPath.getKerning()
is removeda
command parsing for Konva.Path
Konva.Text
when the pattern has an offset or rotationKonva.names
and Konva.ids
are removedKonva.captureTouchEventsEnabled
is renamed to Konva.capturePointerEventsEnabled
Changelog
7.2.2
Konva.Line
with tensionshape.intersects()
behavior when a node is draggedKonva.Text
Changelog
7.2.1
Konva.Label
when heigh of text is changedtransformstart
and transformend
events when several nodes are attached with Konva.Transformer