mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 13:38:15 +08:00
fix transformstart event. close #1294
This commit is contained in:
parent
427f03fc07
commit
a75fd53f0e
@ -3,6 +3,8 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- Fix event object on `transformstart` event.
|
||||
|
||||
## 8.3.3 (2022-03-23)
|
||||
|
||||
- Fix `justify` align for text with several paragraphs.
|
||||
|
@ -198,9 +198,7 @@ export class Shape<
|
||||
}
|
||||
|
||||
getContext() {
|
||||
Util.warn(
|
||||
'shape.getContext() method is deprecated. Please do not use it.'
|
||||
);
|
||||
Util.warn('shape.getContext() method is deprecated. Please do not use it.');
|
||||
return this.getLayer().getContext();
|
||||
}
|
||||
getCanvas() {
|
||||
|
@ -649,9 +649,9 @@ export class Transformer extends Group {
|
||||
x: pos.x - ap.x,
|
||||
y: pos.y - ap.y,
|
||||
};
|
||||
this._fire('transformstart', { evt: e, target: this.getNode() });
|
||||
this._fire('transformstart', { evt: e.evt, target: this.getNode() });
|
||||
this._nodes.forEach((target) => {
|
||||
target._fire('transformstart', { evt: e, target });
|
||||
target._fire('transformstart', { evt: e.evt, target });
|
||||
});
|
||||
}
|
||||
_handleMouseMove(e) {
|
||||
|
File diff suppressed because one or more lines are too long
@ -2509,7 +2509,7 @@ describe('Transformer', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('transform events check', function () {
|
||||
it.only('transform events check', function () {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
stage.add(layer);
|
||||
@ -2535,6 +2535,7 @@ describe('Transformer', function () {
|
||||
callCount += 1;
|
||||
assert.equal(e.target, rect);
|
||||
assert.equal(tr.getActiveAnchor(), 'top-left');
|
||||
assert.equal(typeof e.evt.clientX === 'number', true);
|
||||
});
|
||||
|
||||
rect.on('transform', function (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user