Skip to content

Commit

Permalink
little rename
Browse files Browse the repository at this point in the history
  • Loading branch information
lavrton committed Dec 20, 2023
1 parent 8a05f34 commit fc0ebb7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/shapes/Transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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>;
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit fc0ebb7

Please sign in to comment.