mirror of
https://github.com/konvajs/konva.git
synced 2025-11-24 16:53:06 +08:00
add rotateHandlerOffset property
This commit is contained in:
8
konva.js
8
konva.js
@@ -2,7 +2,7 @@
|
||||
* Konva JavaScript Framework v1.7.6
|
||||
* http://konvajs.github.io/
|
||||
* Licensed under the MIT or GPL Version 2 licenses.
|
||||
* Date: Thu Jan 04 2018
|
||||
* Date: Wed Jan 10 2018
|
||||
*
|
||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||
* Modified work Copyright (C) 2014 - 2017 by Anton Lavrenov (Konva)
|
||||
@@ -18071,6 +18071,7 @@
|
||||
* The default is 0
|
||||
* @param {Number} config.pointerLength
|
||||
* @param {Number} config.pointerWidth
|
||||
* @param {Boolean} config.pointerAtBeginning Do we need to draw pointer on both sides?. Default false.
|
||||
* @param {String} [config.fill] fill color
|
||||
* @param {Image} [config.fillPatternImage] fill pattern image
|
||||
* @param {Number} [config.fillPatternX]
|
||||
@@ -18343,7 +18344,7 @@
|
||||
ctx.beginPath();
|
||||
ctx.rect(0, 0, this.width(), this.height());
|
||||
ctx.moveTo(this.width() / 2, 0);
|
||||
ctx.lineTo(this.width() / 2, -50);
|
||||
ctx.lineTo(this.width() / 2, -this.rotateHandlerOffset());
|
||||
ctx.fillStrokeShape(this);
|
||||
}
|
||||
});
|
||||
@@ -18637,7 +18638,7 @@
|
||||
|
||||
this.findOne('.rotater').setAttrs({
|
||||
x: width / 2,
|
||||
y: -50
|
||||
y: -this.rotateHandlerOffset()
|
||||
});
|
||||
|
||||
this.findOne('.back').setAttrs({
|
||||
@@ -18659,6 +18660,7 @@
|
||||
Konva.Factory.addGetterSetter(Konva.Transformer, 'keepRatio', false);
|
||||
Konva.Factory.addGetterSetter(Konva.Transformer, 'resizeEnabled', true);
|
||||
Konva.Factory.addGetterSetter(Konva.Transformer, 'rotationSnaps', []);
|
||||
Konva.Factory.addGetterSetter(Konva.Transformer, 'rotateHandlerOffset', 50);
|
||||
|
||||
Konva.Collection.mapMethods(Konva.Transformer);
|
||||
})(Konva);
|
||||
|
||||
4
konva.min.js
vendored
4
konva.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -88,7 +88,7 @@
|
||||
ctx.beginPath();
|
||||
ctx.rect(0, 0, this.width(), this.height());
|
||||
ctx.moveTo(this.width() / 2, 0);
|
||||
ctx.lineTo(this.width() / 2, -50);
|
||||
ctx.lineTo(this.width() / 2, -this.rotateHandlerOffset());
|
||||
ctx.fillStrokeShape(this);
|
||||
}
|
||||
});
|
||||
@@ -382,7 +382,7 @@
|
||||
|
||||
this.findOne('.rotater').setAttrs({
|
||||
x: width / 2,
|
||||
y: -50
|
||||
y: -this.rotateHandlerOffset()
|
||||
});
|
||||
|
||||
this.findOne('.back').setAttrs({
|
||||
@@ -404,6 +404,7 @@
|
||||
Konva.Factory.addGetterSetter(Konva.Transformer, 'keepRatio', false);
|
||||
Konva.Factory.addGetterSetter(Konva.Transformer, 'resizeEnabled', true);
|
||||
Konva.Factory.addGetterSetter(Konva.Transformer, 'rotationSnaps', []);
|
||||
Konva.Factory.addGetterSetter(Konva.Transformer, 'rotateHandlerOffset', 50);
|
||||
|
||||
Konva.Collection.mapMethods(Konva.Transformer);
|
||||
})(Konva);
|
||||
|
||||
Reference in New Issue
Block a user