mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 05:14:58 +08:00
fix evt property when transformer is used. fix #981
This commit is contained in:
@@ -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/).
|
||||
|
||||
* fixes for `dragstart` event when `Konva.Transformer` is used. `dragstart` event will have correct native `evt` reference
|
||||
* Better unicode support in `Konva.Text` and `Konva.TextPath`. Emoji should work better now 👍
|
||||
|
||||
## 7.1.0
|
||||
|
||||
@@ -347,7 +347,7 @@ export class Transformer extends Group {
|
||||
x: otherAbs.x + dx,
|
||||
y: otherAbs.y + dy,
|
||||
});
|
||||
otherNode.startDrag();
|
||||
otherNode.startDrag(e);
|
||||
});
|
||||
lastPos = null;
|
||||
});
|
||||
|
||||
@@ -3856,7 +3856,7 @@ suite('Transformer', function () {
|
||||
assert.almostEqual(tr.y(), 100);
|
||||
});
|
||||
|
||||
test('drag several nodes', function () {
|
||||
test.only('drag several nodes', function () {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
stage.add(layer);
|
||||
@@ -3914,7 +3914,8 @@ suite('Transformer', function () {
|
||||
|
||||
// also drag should bubble to stage
|
||||
// two times for two rects
|
||||
stage.on('dragstart', () => {
|
||||
stage.on('dragstart', (e) => {
|
||||
assert.equal(!!e.evt, true);
|
||||
dragstart += 1;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user