diff --git a/src/path.js b/src/path.js index 653cd9eab4b..d9d8fc98913 100644 --- a/src/path.js +++ b/src/path.js @@ -3,6 +3,7 @@ import attributes from "./attributes"; function path() { this.render = true; this.attributes = new attributes(); + this.ops = []; } /** Adds a move operation to Point to */ diff --git a/src/pattern.js b/src/pattern.js index 869db520edf..4d77d2dd672 100644 --- a/src/pattern.js +++ b/src/pattern.js @@ -35,6 +35,7 @@ export default function pattern(config = false) { this.hooks = new hooks(); // Data containers + this.settings = {}; this.values = {}; this.parts = {}; for (let id of config.parts) { @@ -53,7 +54,8 @@ export default function pattern(config = false) { parts: this.parts, options: this.options, values: this.values, - config: this.config + config: this.config, + settings: this.settings }; } diff --git a/src/point.js b/src/point.js index 9a371a820f5..a6a6e7d5826 100644 --- a/src/point.js +++ b/src/point.js @@ -66,12 +66,12 @@ point.prototype.rotate = function(deg, that) { let x = that.x + radius * Math.cos(this.deg2rad(angle + deg)) * -1; let y = that.y + radius * Math.sin(this.deg2rad(angle + deg)); - return new Point(x, y); + return new point(x, y); }; /** returns an identical copy of this point */ point.prototype.copy = function() { - return new Point(this.x, this.y); + return new point(this.x, this.y); }; /** checks whether this point is equal to that point */ @@ -81,12 +81,12 @@ point.prototype.equals = function(that) { /** Mirrors this point around X value of that point */ point.prototype.flipX = function(that) { - return new Point(that.x + this.dx(that), that.y); + return new point(that.x + this.dx(that), that.y); }; /** Mirrors this point around Y value of that point */ point.prototype.flipY = function(that) { - return new Point(that.x, that.y + this.dy(that)); + return new point(that.x, that.y + this.dy(that)); }; /** Shifts this point distance in the deg direction */ diff --git a/src/svg.js b/src/svg.js index b046540b727..d6ae1897fbd 100644 --- a/src/svg.js +++ b/src/svg.js @@ -5,6 +5,8 @@ import hooks from "./hooks"; import { version } from "../package.json"; function svg(pattern) { + this.openGroups = []; + this.freeId = 0; this.body = ""; this.style = ""; this.script = "";