Moved some more
This commit is contained in:
parent
44b18c682f
commit
fe0ec212b0
13 changed files with 1674 additions and 0 deletions
25
plugins/plugin-annotations/src/notches.mjs
Normal file
25
plugins/plugin-annotations/src/notches.mjs
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { name, version } from '../data.mjs'
|
||||
|
||||
const markers = `
|
||||
<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 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>`
|
||||
|
||||
export const notches = {
|
||||
name,
|
||||
version,
|
||||
hooks: {
|
||||
preRender: function (svg) {
|
||||
if (svg.defs.indexOf(`id="notch"`) === -1) svg.defs += markers
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// More specifically named exports
|
||||
// export const notchesPlugin = notches
|
||||
// export const pluginNotches = notches
|
Loading…
Add table
Add a link
Reference in a new issue