aboutsummaryrefslogtreecommitdiffstats
path: root/src/elements/Tspan.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2021-01-13 17:26:33 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2021-01-13 17:26:33 +0100
commit4524c20b48abe08e69c25a7382a289592d147496 (patch)
tree3e475fe673d5acd800180282e84df03d396106f3 /src/elements/Tspan.js
parent4f4dc2afa62cb899a5cae72c359150f8adf27edb (diff)
downloadsvg.js-4524c20b48abe08e69c25a7382a289592d147496.tar.gz
svg.js-4524c20b48abe08e69c25a7382a289592d147496.zip
update dependencies, apply new linter fixes
Diffstat (limited to 'src/elements/Tspan.js')
-rw-r--r--src/elements/Tspan.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/elements/Tspan.js b/src/elements/Tspan.js
index 59860f7..73cd52d 100644
--- a/src/elements/Tspan.js
+++ b/src/elements/Tspan.js
@@ -34,18 +34,18 @@ export default class Tspan extends Shape {
this.dom.newLined = true
// fetch parent
- var text = this.parent()
+ const text = this.parent()
// early return in case we are not in a text element
if (!(text instanceof Text)) {
return this
}
- var i = text.index(this)
+ const i = text.index(this)
- var fontSize = globals.window.getComputedStyle(this.node)
+ const fontSize = globals.window.getComputedStyle(this.node)
.getPropertyValue('font-size')
- var dy = text.dom.leading * new SVGNumber(fontSize)
+ const dy = text.dom.leading * new SVGNumber(fontSize)
// apply new position
return this.dy(i ? dy : 0).attr('x', text.x())
@@ -73,7 +73,7 @@ extend(Tspan, textable)
registerMethods({
Tspan: {
tspan: wrapWithAttrCheck(function (text = '') {
- var tspan = new Tspan()
+ const tspan = new Tspan()
// clear if build mode is disabled
if (!this._build) {