diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-30 13:19:58 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-30 13:19:58 +0100 |
commit | f4531868a190af69c4ecdcf6d7be6d3fc59f5d46 (patch) | |
tree | 1fc76780ad6918ef7b6eb0e302a55f1b043d8bc5 /src/elements/Bare.js | |
parent | d64b964d21e1399b198e44555be68a12378053e7 (diff) | |
parent | efc82b0eafa72902b35c2b22cd9e86bdbdd3edfb (diff) | |
download | svg.js-f4531868a190af69c4ecdcf6d7be6d3fc59f5d46.tar.gz svg.js-f4531868a190af69c4ecdcf6d7be6d3fc59f5d46.zip |
Merge branch '3.0.0' into 790-color-spaces
Diffstat (limited to 'src/elements/Bare.js')
-rw-r--r-- | src/elements/Bare.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/elements/Bare.js b/src/elements/Bare.js deleted file mode 100644 index a057634..0000000 --- a/src/elements/Bare.js +++ /dev/null @@ -1,31 +0,0 @@ -import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js' -import { registerMethods } from '../utils/methods.js' -import Container from './Container.js' -import { globals } from '../utils/window.js' - -export default class Bare extends Container { - constructor (node, attrs) { - super(nodeOrNew(node, typeof node === 'string' ? null : node), attrs) - } - - words (text) { - // remove contents - while (this.node.hasChildNodes()) { - this.node.removeChild(this.node.lastChild) - } - - // create text node - this.node.appendChild(globals.document.createTextNode(text)) - - return this - } -} - -register(Bare) - -registerMethods('Container', { - // Create an element that is not described by SVG.js - element: wrapWithAttrCheck(function (node) { - return this.put(new Bare(node)) - }) -}) |