Build distribution, fix unit test

This commit is contained in:
kangax 2013-08-30 13:52:24 +02:00
parent 5f86b84b87
commit 191ce1aa69
4 changed files with 20 additions and 6 deletions

20
dist/all.js vendored
View file

@ -12847,9 +12847,22 @@ fabric.util.object.extend(fabric.Object.prototype, /** @lends fabric.Object.prot
this.set('radius', options.radius || 0);
this.callSuper('initialize', options);
},
var diameter = this.get('radius') * 2;
this.set('width', diameter).set('height', diameter);
/**
* @private
* @param {String} key
* @param {Any} value
* @return {fabric.Circle} thisArg
*/
_set: function(key, value) {
this.callSuper('_set', key, value);
if (key === 'radius') {
this.setRadius(value);
}
return this;
},
/**
@ -17675,7 +17688,6 @@ fabric.Image.filters.BaseFilter = fabric.util.createClass(/** @lends fabric.Imag
* @return {String} svg representation of an instance
*/
toSVG: function() {
var textLines = this.text.split(/\r?\n/),
lineTopOffset = this.useNative
? this.fontSize * this.lineHeight
@ -17696,7 +17708,7 @@ fabric.Image.filters.BaseFilter = fabric.util.createClass(/** @lends fabric.Imag
'<g transform="', this.getSvgTransform(), '">',
textAndBg.textBgRects.join(''),
'<text ',
(this.fontFamily ? 'font-family="\'' + this.fontFamily + '\'" ': ''),
(this.fontFamily ? 'font-family="' + this.fontFamily.replace(/"/g,'\'') + '" ': ''),
(this.fontSize ? 'font-size="' + this.fontSize + '" ': ''),
(this.fontStyle ? 'font-style="' + this.fontStyle + '" ': ''),
(this.fontWeight ? 'font-weight="' + this.fontWeight + '" ': ''),

4
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

@ -107,6 +107,8 @@
var augmentedProperties = fabric.util.object.extend(fabric.util.object.clone(defaultProperties), {
left: 100,
top: 200,
width: 30,
height: 30,
radius: 15
});