diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-19 21:49:21 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-19 21:49:21 +0100 |
commit | 2b37d7ba5b4267b39c86f9aba5fb14a1b376e846 (patch) | |
tree | 279c1feafcc398fa43aef375ae995068c6093ed1 /src/elements/Image.js | |
parent | 9943813f3779d2ede508a90dadd087fc0ad12f1f (diff) | |
download | svg.js-2b37d7ba5b4267b39c86f9aba5fb14a1b376e846.tar.gz svg.js-2b37d7ba5b4267b39c86f9aba5fb14a1b376e846.zip |
rename `doc()` to `root()` and `toDoc()` to `toRoot()` as dicussed in (#932)
Diffstat (limited to 'src/elements/Image.js')
-rw-r--r-- | src/elements/Image.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/Image.js b/src/elements/Image.js index bf2de0e..8f27470 100644 --- a/src/elements/Image.js +++ b/src/elements/Image.js @@ -52,12 +52,12 @@ registerAttrHook(function (attr, val, _this) { // convert image fill and stroke to patterns if (attr === 'fill' || attr === 'stroke') { if (isImage.test(val)) { - val = _this.doc().defs().image(val) + val = _this.root().defs().image(val) } } if (val instanceof Image) { - val = _this.doc().defs().pattern(0, 0, (pattern) => { + val = _this.root().defs().pattern(0, 0, (pattern) => { pattern.add(val) }) } |