mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-20 19:31:52 +00:00
Update ellipse.class.js
This commit is contained in:
parent
3f47559589
commit
66d6b633ba
1 changed files with 12 additions and 12 deletions
|
|
@ -118,7 +118,7 @@
|
|||
ctx.arc(noTransform ? this.left : 0, noTransform ? this.top*this.rx/this.ry : 0, this.rx, 0, piBy2, false);
|
||||
this._renderFill(ctx);
|
||||
this._renderStroke(ctx);
|
||||
ctx.restore();
|
||||
ctx.restore();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -151,20 +151,20 @@
|
|||
options || (options = { });
|
||||
|
||||
var parsedAttributes = fabric.parseAttributes(element, fabric.Ellipse.ATTRIBUTE_NAMES),
|
||||
cx = parsedAttributes.left || 0,
|
||||
cy = parsedAttributes.top || 0;
|
||||
cx = parsedAttributes.left || 0,
|
||||
cy = parsedAttributes.top || 0;
|
||||
|
||||
if (!('left' in parsedAttributes)) {
|
||||
parsedAttributes.left=0;
|
||||
}
|
||||
parsedAttributes.left -= (options.width / 2) || 0;
|
||||
if (!('left' in parsedAttributes)) {
|
||||
parsedAttributes.left=0;
|
||||
}
|
||||
parsedAttributes.left -= (options.width / 2) || 0;
|
||||
|
||||
if (!('top' in parsedAttributes)) {
|
||||
parsedAttributes.top=0;
|
||||
}
|
||||
parsedAttributes.top -= (options.height / 2) || 0;
|
||||
if (!('top' in parsedAttributes)) {
|
||||
parsedAttributes.top=0;
|
||||
}
|
||||
parsedAttributes.top -= (options.height / 2) || 0;
|
||||
|
||||
return ellipse;
|
||||
return ellipse;
|
||||
};
|
||||
/* _FROM_SVG_END_ */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue