mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 05:58:29 +08:00
fix transform on double touch, fix #1767
This commit is contained in:
parent
8be222e80e
commit
83523ecc6f
@ -670,6 +670,11 @@ export class Transformer extends Group {
|
||||
});
|
||||
}
|
||||
_handleMouseDown(e) {
|
||||
// do nothing if we already transforming
|
||||
// that is possible to trigger with multitouch
|
||||
if (this._transforming) {
|
||||
return;
|
||||
}
|
||||
this._movingAnchorName = e.target.name().split(' ')[0];
|
||||
|
||||
var attrs = this._getNodeRect();
|
||||
|
@ -48,12 +48,25 @@
|
||||
x: 10,
|
||||
y: 10,
|
||||
text: 'Simple Text',
|
||||
fontSize: 300,
|
||||
fontSize: 100,
|
||||
fontFamily: 'Calibri',
|
||||
fill: 'green',
|
||||
textDecoration: 'underline line-through',
|
||||
draggable: true,
|
||||
});
|
||||
layer.add(text);
|
||||
|
||||
var tr = new Konva.Transformer({
|
||||
nodes: [text],
|
||||
});
|
||||
layer.add(tr);
|
||||
|
||||
tr.on('transformstart', () => {
|
||||
console.log('transform start');
|
||||
});
|
||||
tr.on('transformend', () => {
|
||||
console.log('transform end');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user