update CHANGELOG with new version

This commit is contained in:
Anton Lavrenov
2018-10-24 08:02:01 -05:00
parent 5136e29d6a
commit 7a95e9ad80
4 changed files with 58 additions and 3 deletions

View File

@@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [new version][unreleased]
## [2.5.0][2018-10-24]
### Added
* New `anchorCornerRadius` for `Konva.Transformer`
@@ -14,7 +16,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Changed
* ``dragstart` event behaviour is a bit changed. It will fire BEFORE actual position of a node is changed.
* `dragstart` event behavior is a bit changed. It will fire BEFORE actual position of a node is changed.
## [2.4.2][2018-10-12]

View File

@@ -2,7 +2,7 @@
* Konva JavaScript Framework v2.4.2
* http://konvajs.github.io/
* Licensed under the MIT
* Date: Mon Oct 22 2018
* Date: Wed Oct 24 2018
*
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)

2
konva.min.js vendored
View File

@@ -2,7 +2,7 @@
* Konva JavaScript Framework v2.4.2
* http://konvajs.github.io/
* Licensed under the MIT
* Date: Mon Oct 22 2018
* Date: Wed Oct 24 2018
*
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)

View File

@@ -753,6 +753,59 @@ suite('Transformer', function() {
assert.equal(rect.height(), 100);
});
test.skip('test padding + keep ratio', function() {
var stage = addStage();
var layer = new Konva.Layer();
stage.add(layer);
const rect = new Konva.Rect({
x: 50,
y: 50,
width: 200,
height: 10,
fill: 'red'
});
layer.add(rect);
var tr = new Konva.Transformer({
node: rect,
padding: 50,
keepRatio: true
});
layer.add(tr);
layer.draw();
stage.simulateMouseDown({
x: 200,
y: 150
});
var top = stage.content.getBoundingClientRect().top;
tr._handleMouseMove({
target: tr.findOne('.bottom-right'),
clientX: 200,
clientY: 150 + top
});
// here is duplicate, because transformer is listening window events
tr._handleMouseUp({
clientX: 200,
clientY: 150 + top
});
stage.simulateMouseUp({
x: 200,
y: 150
});
layer.draw();
assert.equal(rect.x(), 50);
assert.equal(rect.y(), 50);
assert.equal(rect.width(), 100);
assert.equal(rect.height(), 50);
assert.equal(rect.scaleX(), 1);
assert.equal(rect.scaleY(), 1);
});
test('can add padding with rotation', function() {
var stage = addStage();
var layer = new Konva.Layer();