diff --git a/README.md b/README.md index 790bb90..80e4678 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,10 @@ const mySerializedSVG = ctx.getSerializedSvg(); ## CHANGELOG +### v2.0.3 + +- feat: sync element's width and height to context + ### v2.0.2 - feat: Implement CanvasTransform Interface, https://github.com/gliffy/canvas2svg/pull/83 diff --git a/context.js b/context.js index 72a7033..78965b5 100644 --- a/context.js +++ b/context.js @@ -1,5 +1,5 @@ /*!! - * SVGCanvas v2.0.1 + * SVGCanvas v2.0.3 * Draw on SVG using Canvas's 2D Context API. * * Licensed under the MIT license: diff --git a/element.js b/element.js index 1e9be49..b464131 100644 --- a/element.js +++ b/element.js @@ -2,9 +2,7 @@ import Context from './context'; function SVGCanvasElement(options) { - var debug = options && options.debug; - - this.ctx = new Context(100, 100, {debug: debug}); + this.ctx = new Context(100, 100); this.svg = this.ctx.__root; // sync attributes to svg @@ -34,7 +32,7 @@ function SVGCanvasElement(options) { if (isNaN(val) || (typeof val === "undefined")) { return; } - _this.ctx['__'+prop] = val; + _this.ctx[prop] = val; svg.setAttribute(prop, val); return wrapper[prop] = val; }