diff --git a/src/mixins/object_geometry.mixin.js b/src/mixins/object_geometry.mixin.js index d5679064..b99aa323 100644 --- a/src/mixins/object_geometry.mixin.js +++ b/src/mixins/object_geometry.mixin.js @@ -454,8 +454,8 @@ }, /** - * Sets corner position coordinates based on current angle, width and height - * See https://github.com/kangax/fabric.js/wiki/When-to-call-setCoords + * Sets corner position coordinates based on current angle, width and height. + * See {@link https://github.com/kangax/fabric.js/wiki/When-to-call-setCoords|When-to-call-setCoords} * @param {Boolean} [ignoreZoom] set oCoords with or without the viewport transform. * @param {Boolean} [skipAbsolute] skip calculation of aCoords, usefull in setViewportTransform * @return {fabric.Object} thisArg diff --git a/src/shapes/object.class.js b/src/shapes/object.class.js index 5052302e..761032df 100644 --- a/src/shapes/object.class.js +++ b/src/shapes/object.class.js @@ -1588,20 +1588,18 @@ * @param {String} [options.repeat=repeat] Repeat property of a pattern (one of repeat, repeat-x, repeat-y or no-repeat) * @param {Number} [options.offsetX=0] Pattern horizontal offset from object's left/top corner * @param {Number} [options.offsetY=0] Pattern vertical offset from object's left/top corner + * @param {Function} [callback] Callback to invoke when image set as a pattern * @return {fabric.Object} thisArg * @chainable * @see {@link http://jsfiddle.net/fabricjs/QT3pa/|jsFiddle demo} * @example Set pattern - * fabric.util.loadImage('http://fabricjs.com/assets/escheresque_ste.png', function(img) { - * object.setPatternFill({ - * source: img, - * repeat: 'repeat' - * }); - * canvas.renderAll(); - * }); + * object.setPatternFill({ + * source: 'http://fabricjs.com/assets/escheresque_ste.png', + * repeat: 'repeat' + * },canvas.renderAll.bind(canvas)); */ - setPatternFill: function(options) { - return this.set('fill', new fabric.Pattern(options)); + setPatternFill: function(options, callback) { + return this.set('fill', new fabric.Pattern(options, callback)); }, /** diff --git a/src/shapes/text.class.js b/src/shapes/text.class.js index 8fb59d10..1ba9869e 100644 --- a/src/shapes/text.class.js +++ b/src/shapes/text.class.js @@ -93,21 +93,21 @@ /** * Text decoration underline. - * @type String + * @type Boolean * @default */ underline: false, /** * Text decoration overline. - * @type String + * @type Boolean * @default */ overline: false, /** * Text decoration linethrough. - * @type String + * @type Boolean * @default */ linethrough: false,