mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
update CHANGELOG with new version
This commit is contained in:
parent
51371a8140
commit
e0c206713f
44
konva.js
44
konva.js
@ -8,7 +8,7 @@
|
|||||||
* Konva JavaScript Framework v8.0.4
|
* Konva JavaScript Framework v8.0.4
|
||||||
* http://konvajs.org/
|
* http://konvajs.org/
|
||||||
* Licensed under the MIT
|
* Licensed under the MIT
|
||||||
* Date: Tue Jun 08 2021
|
* Date: Tue Jun 29 2021
|
||||||
*
|
*
|
||||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||||
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
|
* Modified work Copyright (C) 2014 - present by Anton Lavrenov (Konva)
|
||||||
@ -6645,11 +6645,11 @@
|
|||||||
shapes[key] = this;
|
shapes[key] = this;
|
||||||
}
|
}
|
||||||
getContext() {
|
getContext() {
|
||||||
Util.warn('shape.getContext() method is deprecated. Please don not use it.');
|
Util.warn('shape.getContext() method is deprecated. Please do not use it.');
|
||||||
return this.getLayer().getContext();
|
return this.getLayer().getContext();
|
||||||
}
|
}
|
||||||
getCanvas() {
|
getCanvas() {
|
||||||
Util.warn('shape.getCanvas() method is deprecated. Please don not use it.');
|
Util.warn('shape.getCanvas() method is deprecated. Please do not use it.');
|
||||||
return this.getLayer().getCanvas();
|
return this.getLayer().getCanvas();
|
||||||
}
|
}
|
||||||
getSceneFunc() {
|
getSceneFunc() {
|
||||||
@ -14592,7 +14592,8 @@
|
|||||||
* @param {Boolean} [config.flipEnabled] Can we flip/mirror shape on transform?. True by default
|
* @param {Boolean} [config.flipEnabled] Can we flip/mirror shape on transform?. True by default
|
||||||
* @param {Function} [config.boundBoxFunc] Bounding box function
|
* @param {Function} [config.boundBoxFunc] Bounding box function
|
||||||
* @param {Function} [config.ignoreStroke] Should we ignore stroke size? Default is false
|
* @param {Function} [config.ignoreStroke] Should we ignore stroke size? Default is false
|
||||||
*
|
* @param {Boolean} [config.useSingleNodeRotation] When just one node attached, should we use its rotation for transformer?
|
||||||
|
* @param {Boolean} [config.shouldOverdrawWholeArea] Should we fill whole transformer area with fake transparent shape to enable dragging from empty spaces?
|
||||||
* @example
|
* @example
|
||||||
* var transformer = new Konva.Transformer({
|
* var transformer = new Konva.Transformer({
|
||||||
* nodes: [rectangle],
|
* nodes: [rectangle],
|
||||||
@ -14641,7 +14642,7 @@
|
|||||||
this.detach();
|
this.detach();
|
||||||
}
|
}
|
||||||
this._nodes = nodes;
|
this._nodes = nodes;
|
||||||
if (nodes.length === 1) {
|
if (nodes.length === 1 && this.useSingleNodeRotation()) {
|
||||||
this.rotation(nodes[0].getAbsoluteRotation());
|
this.rotation(nodes[0].getAbsoluteRotation());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -14652,8 +14653,7 @@
|
|||||||
.map((prop) => prop + 'Change.' + EVENTS_NAME)
|
.map((prop) => prop + 'Change.' + EVENTS_NAME)
|
||||||
.join(' ');
|
.join(' ');
|
||||||
const onChange = () => {
|
const onChange = () => {
|
||||||
//
|
if (this.nodes().length === 1 && this.useSingleNodeRotation()) {
|
||||||
if (this.nodes().length === 1) {
|
|
||||||
this.rotation(this.nodes()[0].getAbsoluteRotation());
|
this.rotation(this.nodes()[0].getAbsoluteRotation());
|
||||||
}
|
}
|
||||||
this._resetTransformCache();
|
this._resetTransformCache();
|
||||||
@ -15784,7 +15784,37 @@
|
|||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
Factory.addGetterSetter(Transformer, 'boundBoxFunc');
|
Factory.addGetterSetter(Transformer, 'boundBoxFunc');
|
||||||
|
/**
|
||||||
|
* using this setting you can drag transformer group by dragging empty space between attached nodes
|
||||||
|
* shouldOverdrawWholeArea = true may temporary disable all events on attached nodes
|
||||||
|
* @name Konva.Transformer#shouldOverdrawWholeArea
|
||||||
|
* @method
|
||||||
|
* @param {Boolean} shouldOverdrawWholeArea
|
||||||
|
* @returns {Boolean}
|
||||||
|
* @example
|
||||||
|
* // get
|
||||||
|
* var shouldOverdrawWholeArea = transformer.shouldOverdrawWholeArea();
|
||||||
|
*
|
||||||
|
* // set
|
||||||
|
* transformer.shouldOverdrawWholeArea(true);
|
||||||
|
*/
|
||||||
Factory.addGetterSetter(Transformer, 'shouldOverdrawWholeArea', false);
|
Factory.addGetterSetter(Transformer, 'shouldOverdrawWholeArea', false);
|
||||||
|
/**
|
||||||
|
* If you have just one attached node to Transformer it will set its initial rotation to the rotation of that node.
|
||||||
|
* In some cases you may need to set a different rotation.
|
||||||
|
* @name Konva.Transformer#useSingleNodeRotation
|
||||||
|
* @method
|
||||||
|
* @param {Boolean} useSingleNodeRotation
|
||||||
|
* @returns {Boolean}
|
||||||
|
* @example
|
||||||
|
* // set flag to false
|
||||||
|
* transformer.useSingleNodeRotation(false);
|
||||||
|
* // attach a shape
|
||||||
|
* transformer.nodes([shape]);
|
||||||
|
* transformer.rotation(45);
|
||||||
|
* transformer.update();
|
||||||
|
*/
|
||||||
|
Factory.addGetterSetter(Transformer, 'useSingleNodeRotation', true);
|
||||||
Factory.backCompat(Transformer, {
|
Factory.backCompat(Transformer, {
|
||||||
lineEnabled: 'borderEnabled',
|
lineEnabled: 'borderEnabled',
|
||||||
rotateHandlerOffset: 'rotateAnchorOffset',
|
rotateHandlerOffset: 'rotateAnchorOffset',
|
||||||
|
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user