move canvas functions to codemirror package

+ fix id collisions
This commit is contained in:
Felix Roos 2024-03-17 04:00:28 +01:00
parent 0978fbb15e
commit 076b6f1c82
4 changed files with 38 additions and 37 deletions

View file

@ -150,7 +150,7 @@ export function getWidgetID(widgetConfig) {
// that means, if we use the index index of line position as id, less garbage is generated
// return `widget_${widgetConfig.to}`; // more gargabe
//return `widget_${widgetConfig.index}_${widgetConfig.to}`; // also more garbage
return `widget_${widgetConfig.index}`; // less garbage
return `widget_${widgetConfig.type}_${widgetConfig.index}`; // less garbage
}
function widgetWithLocation(node, widgetConfig) {