diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 11:12:26 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 11:12:26 +0100 |
commit | 834c05b0a251f38043a7961dab920f20720c1144 (patch) | |
tree | 36b610ca049952079468f03f1902f376124ddaa8 /src/elements | |
parent | 4702522137dac17a6312c521f3c1974eb839c5eb (diff) | |
download | svg.js-834c05b0a251f38043a7961dab920f20720c1144.tar.gz svg.js-834c05b0a251f38043a7961dab920f20720c1144.zip |
get rid of the fixmes and todos
Diffstat (limited to 'src/elements')
-rw-r--r-- | src/elements/Rect.js | 16 | ||||
-rw-r--r-- | src/elements/Text.js | 1 |
2 files changed, 4 insertions, 13 deletions
diff --git a/src/elements/Rect.js b/src/elements/Rect.js index 9d6163c..fa66fc3 100644 --- a/src/elements/Rect.js +++ b/src/elements/Rect.js @@ -1,5 +1,6 @@ -import { nodeOrNew, register } from '../utils/adopter.js' +import { extend, nodeOrNew, register } from '../utils/adopter.js' import { registerMethods } from '../utils/methods.js' +import { rx, ry } from '../modules/core/circled.js' import Shape from './Shape.js' export default class Rect extends Shape { @@ -7,19 +8,10 @@ export default class Rect extends Shape { constructor (node) { super(nodeOrNew('rect', node), Rect) } - - // FIXME: unify with circle - // Radius x value - rx (rx) { - return this.attr('rx', rx) - } - - // Radius y value - ry (ry) { - return this.attr('ry', ry) - } } +extend(Rect, { rx, ry }) + registerMethods({ Container: { // Create a rect element diff --git a/src/elements/Text.js b/src/elements/Text.js index 58d50a3..f1aa402 100644 --- a/src/elements/Text.js +++ b/src/elements/Text.js @@ -55,7 +55,6 @@ export default class Text extends Shape { text (text) { // act as getter if (text === undefined) { - // FIXME use children() or each() var children = this.node.childNodes var firstLine = 0 text = '' |