mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
little rename
This commit is contained in:
parent
8a05f34c87
commit
fc0ebb7eaf
@ -18,7 +18,7 @@ export interface Box extends IRect {
|
||||
export interface TransformerConfig extends ContainerConfig {
|
||||
resizeEnabled?: boolean;
|
||||
rotateEnabled?: boolean;
|
||||
rotateLinkLineVisiable?: boolean;
|
||||
rotateLineVisible?: boolean;
|
||||
rotationSnaps?: Array<number>;
|
||||
rotationSnapTolerance?: number;
|
||||
rotateAnchorOffset?: number;
|
||||
@ -206,7 +206,7 @@ function getSnap(snaps: Array<number>, newRotationRad: number, tol: number) {
|
||||
* @param {Object} config
|
||||
* @param {Boolean} [config.resizeEnabled] Default is true
|
||||
* @param {Boolean} [config.rotateEnabled] Default is true
|
||||
* @param {Boolean} [config.rotateLinkLineVisiable] Default is true
|
||||
* @param {Boolean} [config.rotateLineVisible] Default is true
|
||||
* @param {Array} [config.rotationSnaps] Array of angles for rotation snaps. Default is []
|
||||
* @param {Number} [config.rotationSnapTolerance] Snapping tolerance. If closer than this it will snap. Default is 5
|
||||
* @param {Number} [config.rotateAnchorOffset] Default is 50
|
||||
@ -616,7 +616,7 @@ export class Transformer extends Group {
|
||||
shape.height() + padding * 2
|
||||
);
|
||||
ctx.moveTo(shape.width() / 2, -padding);
|
||||
if (tr.rotateEnabled() && tr.rotateLinkLineVisiable()) {
|
||||
if (tr.rotateEnabled() && tr.rotateLineVisible()) {
|
||||
ctx.lineTo(
|
||||
shape.width() / 2,
|
||||
-tr.rotateAnchorOffset() * Util._sign(shape.height()) - padding
|
||||
@ -1291,7 +1291,7 @@ export class Transformer extends Group {
|
||||
anchorSize: GetSet<number, this>;
|
||||
resizeEnabled: GetSet<boolean, this>;
|
||||
rotateEnabled: GetSet<boolean, this>;
|
||||
rotateLinkLineVisiable: GetSet<boolean, this>;
|
||||
rotateLineVisible: GetSet<boolean, this>;
|
||||
rotateAnchorOffset: GetSet<number, this>;
|
||||
rotationSnapTolerance: GetSet<number, this>;
|
||||
rotateAnchorCursor: GetSet<string, this>;
|
||||
@ -1426,19 +1426,19 @@ Factory.addGetterSetter(Transformer, 'anchorSize', 10, getNumberValidator());
|
||||
Factory.addGetterSetter(Transformer, 'rotateEnabled', true);
|
||||
|
||||
/**
|
||||
* get/set visiable to rotate link line.
|
||||
* @name Konva.Transformer#rotateLinkLineVisiable
|
||||
* get/set visibility of a little line that connects transformer and rotate anchor.
|
||||
* @name Konva.Transformer#rotateLineVisible
|
||||
* @method
|
||||
* @param {Boolean} enabled
|
||||
* @returns {Boolean}
|
||||
* @example
|
||||
* // get
|
||||
* var rotateLinkLineVisiable = transformer.rotateLinkLineVisiable();
|
||||
* var rotateLineVisible = transformer.rotateLineVisible();
|
||||
*
|
||||
* // set
|
||||
* transformer.rotateLinkLineVisiable(false);
|
||||
* transformer.rotateLineVisible(false);
|
||||
*/
|
||||
Factory.addGetterSetter(Transformer, 'rotateLinkLineVisiable', true);
|
||||
Factory.addGetterSetter(Transformer, 'rotateLineVisible', true);
|
||||
|
||||
/**
|
||||
* get/set rotation snaps angles.
|
||||
|
Loading…
Reference in New Issue
Block a user