mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
update CHANGELOG with new version
This commit is contained in:
parent
4383e411b3
commit
cd2853d91d
@ -5,6 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Not released:
|
||||
|
||||
## 4.0.7 - 2019-09-03
|
||||
|
||||
* Fixed evt object on `dragstart`
|
||||
* Fixed double tap trigger after dragging
|
||||
|
||||
## 4.0.6 - 2019-08-31
|
||||
|
4
konva.js
4
konva.js
@ -8,7 +8,7 @@
|
||||
* Konva JavaScript Framework v4.0.6
|
||||
* http://konvajs.org/
|
||||
* Licensed under the MIT
|
||||
* Date: Mon Sep 02 2019
|
||||
* Date: Tue Sep 03 2019
|
||||
*
|
||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
|
||||
@ -2390,7 +2390,7 @@
|
||||
if (distance < dragDistance) {
|
||||
return;
|
||||
}
|
||||
node.startDrag(evt);
|
||||
node.startDrag({ evt: evt });
|
||||
// a user can stop dragging inside `dragstart`
|
||||
if (!node.isDragging()) {
|
||||
return;
|
||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@ -68,7 +68,7 @@ export const DD = {
|
||||
if (distance < dragDistance) {
|
||||
return;
|
||||
}
|
||||
node.startDrag(evt);
|
||||
node.startDrag({ evt });
|
||||
// a user can stop dragging inside `dragstart`
|
||||
if (!node.isDragging()) {
|
||||
return;
|
||||
|
@ -757,7 +757,7 @@ export class Stage extends Container<BaseLayer> {
|
||||
fireDblClick = true;
|
||||
clearTimeout(this.dblTimeout);
|
||||
// Konva.inDblClickWindow = false;
|
||||
} else if (!DD.justDragged) {
|
||||
} else if (!DD.justDragged) {
|
||||
Konva.inDblClickWindow = true;
|
||||
clearTimeout(this.dblTimeout);
|
||||
}
|
||||
|
@ -989,6 +989,40 @@ suite('DragAndDrop', function() {
|
||||
assert.equal(circle.y(), 71);
|
||||
});
|
||||
|
||||
test('make sure we have event object', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer();
|
||||
|
||||
var circle = new Konva.Circle({
|
||||
x: 70,
|
||||
y: 70,
|
||||
radius: 70,
|
||||
fill: 'green',
|
||||
stroke: 'black',
|
||||
strokeWidth: 4,
|
||||
name: 'myCircle',
|
||||
draggable: true
|
||||
});
|
||||
|
||||
circle.on('dragstart', function(e) {
|
||||
assert.equal(e.evt === undefined, false);
|
||||
});
|
||||
circle.on('dragmove', function(e) {
|
||||
assert.equal(e.evt === undefined, false);
|
||||
});
|
||||
circle.on('dragend', function(e) {
|
||||
assert.equal(e.evt === undefined, false);
|
||||
});
|
||||
layer.add(circle);
|
||||
stage.add(layer);
|
||||
|
||||
// register pointer
|
||||
stage.simulateMouseDown({ x: 70, y: 80 });
|
||||
// moving by one pixel should move circle too
|
||||
stage.simulateMouseMove({ x: 80, y: 80 });
|
||||
stage.simulateMouseUp({ x: 70, y: 80 });
|
||||
});
|
||||
|
||||
test('try nested dragging', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Konva.Layer({
|
||||
|
Loading…
Reference in New Issue
Block a user