Correct default value for clockwise in arcTo().

This commit is contained in:
Jürg Lehni 2012-10-19 09:18:10 -04:00
parent 6441a682a8
commit f87eadecda

View file

@ -1717,8 +1717,10 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
from = current._point,
through,
point = Point.read(arguments),
next = Base.peekValue(arguments);
if (/boolean|undefined/.test(typeof next)) {
// Peek at next value to see if it's clockwise,
// with true as default value.
next = Base.pick(Base.peekValue(arguments), true);
if (typeof next === 'boolean') {
// arcTo(to, clockwise)
to = point;
clockwise = next;