diff options
| author | Henry Jameson <me@hjkos.com> | 2018-11-23 09:02:10 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-11-23 09:02:10 +0300 |
| commit | 1059d9b602656355780f3bcd1ed3d7885de590c1 (patch) | |
| tree | cd051a0f656140278576cbbf8599032282a3542c /src/components/style_switcher/style_switcher.js | |
| parent | 754d71ec1933d897f9206ddca080bb258256edbb (diff) | |
radii v1 fixes
Diffstat (limited to 'src/components/style_switcher/style_switcher.js')
| -rw-r--r-- | src/components/style_switcher/style_switcher.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/components/style_switcher/style_switcher.js b/src/components/style_switcher/style_switcher.js index 0c302e93..33be522b 100644 --- a/src/components/style_switcher/style_switcher.js +++ b/src/components/style_switcher/style_switcher.js @@ -438,15 +438,11 @@ export default { if (!this.keepRoundness) { this.clearRoundness() - // TODO optimize this - this.btnRadiusLocal = radii.btn - this.inputRadiusLocal = radii.input - this.checkboxRadiusLocal = radii.checkbox - this.panelRadiusLocal = radii.panel - this.avatarRadiusLocal = radii.avatar - this.avatarAltRadiusLocal = radii.avatarAlt - this.tooltipRadiusLocal = radii.tooltip - this.attachmentRadiusLocal = radii.attachment + Object.entries(radii).forEach(([k, v]) => { + // 'Radius' is kept mostly for v1->v2 localstorage transition + const key = k.endsWith('Radius') ? k.split('Radius')[0] : k + this[key + 'RadiusLocal'] = v + }) } if (!this.keepShadows) { |
