From ee0b340bfeb2430767d4a2850413f864c42e5405 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Tue, 25 Jul 2017 14:19:49 +0200 Subject: add new default constructor (#714) --- CHANGELOG.md | 1 + bench/runner.html | 4 +- bench/tests/10000-rects.js | 8 +-- dist/svg.js | 163 ++++++++++++++++++++------------------------- dist/svg.min.js | 4 +- src/container.js | 4 +- src/defs.js | 4 +- src/doc.js | 7 +- src/gradient.js | 2 +- src/helpers.js | 6 -- src/parent.js | 4 +- src/shape.js | 6 +- src/svg.js | 21 ++---- src/text.js | 4 +- src/use.js | 2 +- 15 files changed, 104 insertions(+), 136 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a95fb3..6aef3b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ The document follows the conventions described in [“Keep a CHANGELOG”](http: - `SVG.Nested` is not `overflow:visible` by default - all `SVG.*` objects now can have a node as parameter when constructing - `SVG()` does not set a default size anymore +- default constructor now has an optional `node` argument which is used to consruct the object e.g. `new SVG.Rect(rectNode)` ### Fixed - fixed a bug in clipping and masking where empty nodes persists after removal -> __TODO!__ diff --git a/bench/runner.html b/bench/runner.html index 4bf447c..965a884 100644 --- a/bench/runner.html +++ b/bench/runner.html @@ -40,11 +40,11 @@ - - --> +