mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
fix evt
property when transformer is used. fix #981
This commit is contained in:
parent
c36c8b7da9
commit
1edb5ef55c
@ -3,6 +3,7 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
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 👍
|
* Better unicode support in `Konva.Text` and `Konva.TextPath`. Emoji should work better now 👍
|
||||||
|
|
||||||
## 7.1.0
|
## 7.1.0
|
||||||
|
@ -347,7 +347,7 @@ export class Transformer extends Group {
|
|||||||
x: otherAbs.x + dx,
|
x: otherAbs.x + dx,
|
||||||
y: otherAbs.y + dy,
|
y: otherAbs.y + dy,
|
||||||
});
|
});
|
||||||
otherNode.startDrag();
|
otherNode.startDrag(e);
|
||||||
});
|
});
|
||||||
lastPos = null;
|
lastPos = null;
|
||||||
});
|
});
|
||||||
|
@ -3856,7 +3856,7 @@ suite('Transformer', function () {
|
|||||||
assert.almostEqual(tr.y(), 100);
|
assert.almostEqual(tr.y(), 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('drag several nodes', function () {
|
test.only('drag several nodes', function () {
|
||||||
var stage = addStage();
|
var stage = addStage();
|
||||||
var layer = new Konva.Layer();
|
var layer = new Konva.Layer();
|
||||||
stage.add(layer);
|
stage.add(layer);
|
||||||
@ -3914,7 +3914,8 @@ suite('Transformer', function () {
|
|||||||
|
|
||||||
// also drag should bubble to stage
|
// also drag should bubble to stage
|
||||||
// two times for two rects
|
// two times for two rects
|
||||||
stage.on('dragstart', () => {
|
stage.on('dragstart', (e) => {
|
||||||
|
assert.equal(!!e.evt, true);
|
||||||
dragstart += 1;
|
dragstart += 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user