1
0
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:
Anton Lavrenov 2016-09-20 09:35:30 -04:00
parent 3b22252cc3
commit 763788bd32
5 changed files with 62 additions and 6 deletions

View File

@ -4,7 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [Not released][Not released]
## [1.2.2][2016-09-15]
### Fixed
- refresh stage hit and its `dragend`
- `getClientRect` calculations
## [1.2.0][2016-09-15]

View File

@ -3,7 +3,7 @@
* Konva JavaScript Framework v1.2.1
* http://konvajs.github.io/
* Licensed under the MIT or GPL Version 2 licenses.
* Date: Fri Sep 16 2016
* Date: Tue Sep 20 2016
*
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
@ -11239,7 +11239,7 @@
delete dd.node;
if (node.getLayer() || layer) {
if (node.getLayer() || layer || (node instanceof Konva.Stage)) {
(layer || node).draw();
}

6
konva.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,7 @@
delete dd.node;
if (node.getLayer() || layer) {
if (node.getLayer() || layer || (node instanceof Konva.Stage)) {
(layer || node).draw();
}

View File

@ -316,4 +316,57 @@ suite('DragAndDrop', function() {
assert.equal(true, false, 'error happened');
}
});
test('update hit on stage drag end', function(done) {
var stage = addStage();
stage.draggable(true);
var layer = new Konva.Layer();
stage.add(layer);
var circle = new Konva.Circle({
x: stage.getWidth() / 2,
y: stage.getHeight() / 2,
radius: 70,
fill: 'green',
stroke: 'black',
strokeWidth: 4,
name: 'myCircle'
});
layer.add(circle);
layer.draw();
stage.simulateMouseDown({
x: stage.width() / 2,
y: stage.height() / 2
});
stage.simulateMouseMove({
x: stage.width() / 2 - 50,
y: stage.height() / 2
});
setTimeout(function() {
assert.equal(stage.isDragging(), true);
stage.simulateMouseUp({
x: stage.width() / 2 - 50,
y: stage.height() / 2
});
var shape = layer.getIntersection({
x: stage.width() / 2 + 5,
y: stage.height() / 2
});
assert.equal(shape, circle);
done();
}, 50);
});
});