fix(plugin-annotations): Allow overriding scalbox box classes
This commit is contained in:
parent
049767a3de
commit
415aabb09d
1 changed files with 5 additions and 5 deletions
|
@ -11,6 +11,8 @@ const macroDefaults = {
|
||||||
link: 'text-sm fill-note bold',
|
link: 'text-sm fill-note bold',
|
||||||
metric: 'text-xs center',
|
metric: 'text-xs center',
|
||||||
imperial: 'text-xs center',
|
imperial: 'text-xs center',
|
||||||
|
imperialBox: 'scalebox imperial fill-current',
|
||||||
|
metricBox: 'scalebox metric fill-bg',
|
||||||
},
|
},
|
||||||
lead: 'FreeSewing',
|
lead: 'FreeSewing',
|
||||||
link: 'FreeSewing.org/patrons/join',
|
link: 'FreeSewing.org/patrons/join',
|
||||||
|
@ -174,7 +176,7 @@ const scalebox = function (
|
||||||
* Draw the imperial box
|
* Draw the imperial box
|
||||||
*/
|
*/
|
||||||
paths[ids.imperial] = new Path()
|
paths[ids.imperial] = new Path()
|
||||||
.attr('class', 'scalebox imperial fill-current')
|
.addClass(mc.classes.imperialBox)
|
||||||
.move(box.itl)
|
.move(box.itl)
|
||||||
.line(box.ibl)
|
.line(box.ibl)
|
||||||
.line(box.ibr)
|
.line(box.ibr)
|
||||||
|
@ -186,7 +188,7 @@ const scalebox = function (
|
||||||
* Draw the metric box
|
* Draw the metric box
|
||||||
*/
|
*/
|
||||||
paths[ids.metric] = new Path()
|
paths[ids.metric] = new Path()
|
||||||
.attr('class', 'scalebox metric fill-bg')
|
.addClass(mc.classes.metricBox)
|
||||||
.move(box.mtl)
|
.move(box.mtl)
|
||||||
.line(box.mbl)
|
.line(box.mbl)
|
||||||
.line(box.mbr)
|
.line(box.mbr)
|
||||||
|
@ -197,9 +199,7 @@ const scalebox = function (
|
||||||
/*
|
/*
|
||||||
* Add lead text to the part points
|
* Add lead text to the part points
|
||||||
*/
|
*/
|
||||||
points[ids.textLead] = text.lead
|
points[ids.textLead] = text.lead.addText(mc.lead, mc.classes.lead)
|
||||||
.addText(mc.lead, mc.classes.lead)
|
|
||||||
.attr('data-text-class', 'text-sm')
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Figure out what title to use, and add the title text to the part points
|
* Figure out what title to use, and add the title text to the part points
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue