1
0
Fork 0

chore(plugin-annotations): Migrate title

This commit is contained in:
joostdecock 2023-09-05 20:38:47 +02:00
parent d33139c6d0
commit 3f6a5b4116

View file

@ -1,3 +1,5 @@
import { getIds } from './utils.mjs'
/*
* Defaults for the title macro
*/
@ -22,18 +24,6 @@ const macroDefaults = {
},
}
/*
* Helper method to get the various IDs for points added by this macro
*/
const getIds = (id) => ({
cutlist: `__macro_title_${id}_cutlist`,
date: `__macro_title_${id}_date`,
for: `__macro_title_${id}_for`,
name: `__macro_title_${id}_name`,
nr: `__macro_title_${id}_nr`,
title: `__macro_title_${id}_title`,
})
/*
* Removing all this is easy as all IDs are available in the store
* and all we need to remove are points.
@ -102,7 +92,8 @@ const addTitleMacro = function (
* Get the list of IDs
* Initialize the verticle cadence
*/
const ids = getIds(mc.id)
const ids = getIds(['cutlist', 'date', 'for', 'name', 'nr', 'title'], mc.id, 'title')
let shift = mc.dy
/*