✨ Round return value of path.length()
This commit is contained in:
parent
a8b286e917
commit
60b3e7d126
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
import Attributes from "./attributes";
|
import Attributes from "./attributes";
|
||||||
import Point from "./point";
|
import Point from "./point";
|
||||||
import Bezier from "bezier-js";
|
import Bezier from "bezier-js";
|
||||||
|
import { round } from "./round";
|
||||||
|
|
||||||
function Path() {
|
function Path() {
|
||||||
this.render = true;
|
this.render = true;
|
||||||
|
@ -102,7 +103,7 @@ Path.prototype.length = function() {
|
||||||
if (op.to) current = op.to;
|
if (op.to) current = op.to;
|
||||||
}
|
}
|
||||||
|
|
||||||
return length;
|
return round(length);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Returns the startpoint of the path */
|
/** Returns the startpoint of the path */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue