Implement @eriese suggestion
This commit is contained in:
parent
0213c92b0f
commit
9536476512
7 changed files with 103 additions and 30 deletions
|
@ -1,18 +1,29 @@
|
|||
const markers = `
|
||||
const defs = [
|
||||
{
|
||||
name: 'notch',
|
||||
def: `
|
||||
<g id="notch">
|
||||
<circle cy="0" cx="0" r="1.4" class="fill-note" />
|
||||
<circle cy="0" cx="0" r="2.8" class="note" />
|
||||
</g>
|
||||
</g>`,
|
||||
},
|
||||
{
|
||||
name: 'bnotch',
|
||||
def: `
|
||||
<g id="bnotch">
|
||||
<path d="M -1.1 -1.1 L 1.1 1.1 M 1.1 -1.1 L -1.1 1.1" class="note" />
|
||||
<circle cy="0" cx="0" r="2.8" class="note" />
|
||||
</g>`
|
||||
</g>`,
|
||||
},
|
||||
]
|
||||
|
||||
// Export hooks
|
||||
export const notchesHooks = {
|
||||
preRender: [
|
||||
function (svg) {
|
||||
svg.defs.setIfUnset('notch', markers)
|
||||
for (const def of defs) {
|
||||
svg.defs.setIfUnset(def.name, def.def)
|
||||
}
|
||||
},
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue