mirror of
https://github.com/konvajs/konva.git
synced 2025-12-19 10:58:20 +08:00
fix for draggable stage
This commit is contained in:
@@ -302,12 +302,16 @@
|
|||||||
height: BASE_BOX_HEIGHT,
|
height: BASE_BOX_HEIGHT,
|
||||||
offsetX: BASE_BOX_WIDTH / 2,
|
offsetX: BASE_BOX_WIDTH / 2,
|
||||||
offsetY: BASE_BOX_HEIGHT / 2,
|
offsetY: BASE_BOX_HEIGHT / 2,
|
||||||
dragDistance: 0
|
dragDistance: 0,
|
||||||
|
draggable: true
|
||||||
});
|
});
|
||||||
var self = this;
|
var self = this;
|
||||||
anchor.on('mousedown touchstart', function(e) {
|
anchor.on('mousedown touchstart', function(e) {
|
||||||
self._handleMouseDown(e);
|
self._handleMouseDown(e);
|
||||||
});
|
});
|
||||||
|
anchor.on('dragstart', function(e) {
|
||||||
|
e.cancelBubble = true;
|
||||||
|
});
|
||||||
|
|
||||||
// add hover styling
|
// add hover styling
|
||||||
anchor.on('mouseenter', function() {
|
anchor.on('mouseenter', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user