1
0
Fork 0
freesewing/packages/plugin-sprinkle/src/index.js

16 lines
383 B
JavaScript
Raw Normal View History

2019-08-03 15:03:33 +02:00
import { name, version } from '../package.json'
2018-12-22 13:48:19 +01:00
export default {
name: name,
version: version,
hooks: {
preRender: svg => svg.attributes.setIfUnset('freesewing:plugin-sprinkle', version)
2018-12-22 13:48:19 +01:00
},
macros: {
2021-01-31 09:22:15 +01:00
sprinkle: function (so) {
2018-12-22 13:48:19 +01:00
for (let pid of so.on)
2019-08-03 15:03:33 +02:00
this.snippets[pid + '-' + so.snippet] = new this.Snippet(so.snippet, this.points[pid])
2021-04-24 10:16:31 +02:00
},
},
2019-08-03 15:03:33 +02:00
}