fix ellipse draw bug and fix shape props context

This commit is contained in:
Horcrux
2016-04-26 21:04:54 +08:00
parent 24dcc83a80
commit 1baf00c034
11 changed files with 29 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
export default function({viewbox, width, height, preserveAspectRatio, x: dx, y: dy, dScale, dScaleX, dScaleY, shouldTransform}) {
export default function({viewbox, width, height, preserveAspectRatio, x: dx, y: dy, dScale, dScaleX, dScaleY}) {
if (!viewbox || !width || !height) {
return false;
}
@@ -47,18 +47,18 @@ export default function({viewbox, width, height, preserveAspectRatio, x: dx, y:
y = -vy * sy;
}
if (shouldTransform) {
x += (+dx || 0);
y += (+dy || 0);
//if (shouldTransform) {
x += (+dx || 0);
y += (+dy || 0);
if (dScale) {
scaleX *= (+dScale || 1);
scaleY *= (+dScale || 1);
} else {
scaleX *= (+dScaleX || 1);
scaleY *= (+dScaleY || 1);
}
if (dScale) {
scaleX *= (+dScale || 1);
scaleY *= (+dScale || 1);
} else {
scaleX *= (+dScaleX || 1);
scaleY *= (+dScaleY || 1);
}
//}
return {
x,