diff --git a/CHANGELOG.md b/CHANGELOG.md index 59144e8c..17729e58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +* Fix autodrawing for `Konva.Transformer` when it is on a different layer * Fix `Konva.RegularPolygon` size calculations. ## 7.1.8 diff --git a/src/shapes/Transformer.ts b/src/shapes/Transformer.ts index 409609ad..0b533d6a 100644 --- a/src/shapes/Transformer.ts +++ b/src/shapes/Transformer.ts @@ -1003,7 +1003,7 @@ export class Transformer extends Group { newTr.rotate(newAttrs.rotation); newTr.scale(newAttrs.width / baseSize, newAttrs.height / baseSize); - // now lets think we had [old transform] and now we have [new transform] + // now lets think we had [old transform] and n ow we have [new transform] // Now, the questions is: how can we transform "parent" to go from [old transform] into [new transform] // in equation it will be: // [delta transform] * [old transform] = [new transform] @@ -1033,6 +1033,7 @@ export class Transformer extends Group { node.setAttrs(attrs); this._fire('transform', { evt: evt, target: node }); node._fire('transform', { evt: evt, target: node }); + node.getLayer()?.batchDraw(); }); this.rotation(Util._getRotation(newAttrs.rotation)); this._resetTransformCache();