diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-06 22:28:20 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-06 22:28:20 +0100 |
commit | 3cb00000586340276998144d202d7af35c47ae36 (patch) | |
tree | 6b431cf16f05efeef63e145d1d1dc6aaceede4fb /src/style.js | |
parent | 2702ceb26d3021720f3ff979bcf5f46fc65699e9 (diff) | |
download | svg.js-3cb00000586340276998144d202d7af35c47ae36.tar.gz svg.js-3cb00000586340276998144d202d7af35c47ae36.zip |
tab to space, block comments to line comments
Diffstat (limited to 'src/style.js')
-rw-r--r-- | src/style.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/style.js b/src/style.js index a7f737d..14cf863 100644 --- a/src/style.js +++ b/src/style.js @@ -2,25 +2,25 @@ SVG.extend(SVG.Element, { // Dynamic style generator style: function(s, v) { if (arguments.length == 0) { - /* get full style */ + // get full style return this.node.style.cssText || '' } else if (arguments.length < 2) { - /* apply every style individually if an object is passed */ + // apply every style individually if an object is passed if (typeof s == 'object') { for (v in s) this.style(v, s[v]) } else if (SVG.regex.isCss.test(s)) { - /* parse css string */ + // parse css string s = s.split(';') - /* apply every definition individually */ + // apply every definition individually for (var i = 0; i < s.length; i++) { v = s[i].split(':') this.style(v[0].replace(/\s+/g, ''), v[1]) } } else { - /* act as a getter if the first and only argument is not an object */ + // act as a getter if the first and only argument is not an object return this.node.style[camelCase(s)] } |