mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 09:17:25 +08:00
fix stop transform bug
This commit is contained in:
parent
32dec19f51
commit
8420e44c1b
@ -5,7 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [new version][unreleased]
|
||||
|
||||
## [2.2.0][2018-08-10]
|
||||
## [2.2.1][2018-08-10]
|
||||
|
||||
### Added
|
||||
|
||||
|
@ -10,7 +10,8 @@
|
||||
'borderStrokeChange',
|
||||
'borderStrokeWidthChange',
|
||||
'anchorStrokeChange',
|
||||
'anchorStrokeWidthChange'
|
||||
'anchorStrokeWidthChange',
|
||||
'anchorFillChange'
|
||||
].join(' ');
|
||||
|
||||
var NODE_RECT = 'nodeRect';
|
||||
@ -105,7 +106,8 @@
|
||||
|
||||
/**
|
||||
* Transformer constructor. Transformer is a special type of group that allow you transform Konva
|
||||
* primitives and shapes.
|
||||
* primitives and shapes. Transforming tool is not changing `width` and `height` properties of nodes
|
||||
* when you resize them. Instead it changes `scaleX` and `scaleY` properties.
|
||||
* @constructor
|
||||
* @memberof Konva
|
||||
* @param {Object} config
|
||||
@ -118,7 +120,8 @@
|
||||
* @param {String} [config.borderStroke] Border stroke color
|
||||
* @param {Number} [config.borderStrokeWidth] Border stroke size
|
||||
* @param {Array} [config.borderDash] Array for border dash.
|
||||
* @param {Number} [config.anchorStroke] Anchor stroke color
|
||||
* @param {String} [config.anchorFill] Anchor fill color
|
||||
* @param {String} [config.anchorStroke] Anchor stroke color
|
||||
* @param {Number} [config.anchorStrokeWidth] Anchor stroke size
|
||||
* @param {Number} [config.anchorSize] Default is 10
|
||||
* @param {Boolean} [config.keepRatio] Should we keep ratio when we are moving edges? Default is true
|
||||
@ -318,6 +321,12 @@
|
||||
anchor.on('dragstart', function(e) {
|
||||
e.cancelBubble = true;
|
||||
});
|
||||
anchor.on('dragmove', function(e) {
|
||||
e.cancelBubble = true;
|
||||
});
|
||||
anchor.on('dragend', function(e) {
|
||||
e.cancelBubble = true;
|
||||
});
|
||||
|
||||
// add hover styling
|
||||
anchor.on('mouseenter', function() {
|
||||
@ -774,6 +783,10 @@
|
||||
stopTransform: function() {
|
||||
if (this._transforming) {
|
||||
this._removeEvents();
|
||||
var resizerNode = this.findOne('.' + this.movingResizer);
|
||||
if (resizerNode) {
|
||||
resizerNode.stopDrag();
|
||||
}
|
||||
}
|
||||
},
|
||||
destroy: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user