[BACK_INCOMPAT] fabric.Object#cornersize -> fabric.Object.cornerSize

This commit is contained in:
kangax 2012-12-22 16:37:43 +01:00
parent 882d7085d8
commit 299273d7bd
4 changed files with 11 additions and 11 deletions

10
dist/all.js vendored
View file

@ -8560,7 +8560,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
* @property
* @type Number
*/
cornersize: 12,
cornerSize: 12,
/**
* When true, object's corners are rendered as transparent inside (i.e. stroke instead of fill)
@ -8710,7 +8710,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
*/
stateProperties: (
'top left width height scaleX scaleY flipX flipY ' +
'angle opacity cornersize fill overlayFill ' +
'angle opacity cornerSize fill overlayFill ' +
'stroke strokeWidth strokeDashArray fillRule ' +
'borderScaleFactor transformMatrix selectable'
).split(' '),
@ -9334,7 +9334,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
/**
* Draws corners of an object's bounding box.
* Requires public properties: width, height, scaleX, scaleY
* Requires public options: cornersize, padding
* Requires public options: cornerSize, padding
* @method drawCorners
* @param {CanvasRenderingContext2D} ctx Context to draw on
* @return {fabric.Object} thisArg
@ -9343,7 +9343,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
drawCorners: function(ctx) {
if (!this.hasControls) return;
var size = this.cornersize,
var size = this.cornerSize,
size2 = size / 2,
strokeWidth2 = this.strokeWidth / 2,
left = -(this.width / 2),
@ -9797,7 +9797,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
var coords = this.oCoords,
theta = degreesToRadians(this.angle),
newTheta = degreesToRadians(45 - this.angle),
cornerHypotenuse = Math.sqrt(2 * Math.pow(this.cornersize, 2)) / 2,
cornerHypotenuse = Math.sqrt(2 * Math.pow(this.cornerSize, 2)) / 2,
cosHalfOffset = cornerHypotenuse * Math.cos(newTheta),
sinHalfOffset = cornerHypotenuse * Math.sin(newTheta),
sinTh = Math.sin(theta),

2
dist/all.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/all.min.js.gz vendored

Binary file not shown.

View file

@ -113,7 +113,7 @@
* @property
* @type Number
*/
cornersize: 12,
cornerSize: 12,
/**
* When true, object's corners are rendered as transparent inside (i.e. stroke instead of fill)
@ -263,7 +263,7 @@
*/
stateProperties: (
'top left width height scaleX scaleY flipX flipY ' +
'angle opacity cornersize fill overlayFill ' +
'angle opacity cornerSize fill overlayFill ' +
'stroke strokeWidth strokeDashArray fillRule ' +
'borderScaleFactor transformMatrix selectable'
).split(' '),
@ -887,7 +887,7 @@
/**
* Draws corners of an object's bounding box.
* Requires public properties: width, height, scaleX, scaleY
* Requires public options: cornersize, padding
* Requires public options: cornerSize, padding
* @method drawCorners
* @param {CanvasRenderingContext2D} ctx Context to draw on
* @return {fabric.Object} thisArg
@ -896,7 +896,7 @@
drawCorners: function(ctx) {
if (!this.hasControls) return;
var size = this.cornersize,
var size = this.cornerSize,
size2 = size / 2,
strokeWidth2 = this.strokeWidth / 2,
left = -(this.width / 2),
@ -1350,7 +1350,7 @@
var coords = this.oCoords,
theta = degreesToRadians(this.angle),
newTheta = degreesToRadians(45 - this.angle),
cornerHypotenuse = Math.sqrt(2 * Math.pow(this.cornersize, 2)) / 2,
cornerHypotenuse = Math.sqrt(2 * Math.pow(this.cornerSize, 2)) / 2,
cosHalfOffset = cornerHypotenuse * Math.cos(newTheta),
sinHalfOffset = cornerHypotenuse * Math.sin(newTheta),
sinTh = Math.sin(theta),