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: function(svg) {
|
2019-08-03 15:03:33 +02:00
|
|
|
if (svg.attributes.get('freesewing:plugin-sprinkle') === false)
|
|
|
|
svg.attributes.set('freesewing:plugin-sprinkle', version)
|
2018-12-22 13:48:19 +01:00
|
|
|
}
|
|
|
|
},
|
|
|
|
macros: {
|
|
|
|
sprinkle: function(so) {
|
|
|
|
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])
|
2018-12-22 13:48:19 +01:00
|
|
|
}
|
|
|
|
}
|
2019-08-03 15:03:33 +02:00
|
|
|
}
|