1
0
Fork 0

feat(plugin-scalebox): Added utility classes for better styling support

This commit is contained in:
Joost De Cock 2021-12-22 18:18:48 +01:00
parent 4d441f4eec
commit 6b70e0e6e9
3 changed files with 8 additions and 4 deletions

View file

@ -52,6 +52,10 @@ unreleased:
plugin-versionfree-svg: plugin-versionfree-svg:
- Added (esm) unit tests - Added (esm) unit tests
Changed:
plugin-scalebox:
- Add utility classes for better styling support
Fixed: Fixed:
plugin-buttons: plugin-buttons:
- Only add snippets once to SVG object - Only add snippets once to SVG object

View file

@ -55,14 +55,14 @@ export default function (so) {
} }
// Paths // Paths
this.paths.__miniscaleImperial = new this.Path() this.paths.__miniscaleImperial = new this.Path()
.attr('class', 'scalebox imperial') .attr('class', 'scalebox imperial fill-current')
.move(this.points.__miniscaleImperialTopLeft) .move(this.points.__miniscaleImperialTopLeft)
.line(this.points.__miniscaleImperialBottomLeft) .line(this.points.__miniscaleImperialBottomLeft)
.line(this.points.__miniscaleImperialBottomRight) .line(this.points.__miniscaleImperialBottomRight)
.line(this.points.__miniscaleImperialTopRight) .line(this.points.__miniscaleImperialTopRight)
.close() .close()
this.paths.__miniscaleMetric = new this.Path() this.paths.__miniscaleMetric = new this.Path()
.attr('class', 'scalebox metric') .attr('class', 'scalebox metric fill-bg')
.move(this.points.__miniscaleMetricTopLeft) .move(this.points.__miniscaleMetricTopLeft)
.line(this.points.__miniscaleMetricBottomLeft) .line(this.points.__miniscaleMetricBottomLeft)
.line(this.points.__miniscaleMetricBottomRight) .line(this.points.__miniscaleMetricBottomRight)

View file

@ -65,14 +65,14 @@ export default function (so) {
} }
// Paths // Paths
this.paths.__scaleboxImperial = new this.Path() this.paths.__scaleboxImperial = new this.Path()
.attr('class', 'scalebox imperial') .attr('class', 'scalebox imperial fill-current')
.move(this.points.__scaleboxImperialTopLeft) .move(this.points.__scaleboxImperialTopLeft)
.line(this.points.__scaleboxImperialBottomLeft) .line(this.points.__scaleboxImperialBottomLeft)
.line(this.points.__scaleboxImperialBottomRight) .line(this.points.__scaleboxImperialBottomRight)
.line(this.points.__scaleboxImperialTopRight) .line(this.points.__scaleboxImperialTopRight)
.close() .close()
this.paths.__scaleboxMetric = new this.Path() this.paths.__scaleboxMetric = new this.Path()
.attr('class', 'scalebox metric') .attr('class', 'scalebox metric fill-bg')
.move(this.points.__scaleboxMetricTopLeft) .move(this.points.__scaleboxMetricTopLeft)
.line(this.points.__scaleboxMetricBottomLeft) .line(this.points.__scaleboxMetricBottomLeft)
.line(this.points.__scaleboxMetricBottomRight) .line(this.points.__scaleboxMetricBottomRight)