Fixes/Enhancements

- Removed bar data from exported drawings, which should reduce the file size of exported drawings. (Make sure to back up any drawing files before running the new version!)
- Drawings can now be deleted through each’s right click context menu.
- Added the new ‘hotkey’ method, which will execute the given method or function when the key command is pressed.
- Non-fixed callbacks no longer need to be placed in the API class.
This commit is contained in:
louisnw
2023-07-24 17:03:31 +01:00
parent eaec61d739
commit ca3122baf3
9 changed files with 170 additions and 71 deletions

View File

@ -60,7 +60,7 @@ function makeSearchBox(chart) {
else return false
}
else if (event.key === 'Enter') {
chart.callbackFunction(`on_search__${chart.id}__${sBox.value}`)
chart.callbackFunction(`on_search_~_${chart.id}_~_${sBox.value}`)
searchWindow.style.display = 'none'
sBox.value = ''
return true
@ -145,7 +145,7 @@ function makeSwitcher(chart, items, activeItem, callbackName, activeBackgroundCo
element.style.color = items[index] === item ? 'activeColor' : inactiveColor
});
activeItem = item;
chart.callbackFunction(`${callbackName}__${chart.id}__${item}`);
chart.callbackFunction(`${callbackName}_~_${chart.id}_~_${item}`);
}
chart.topBar.appendChild(switcherElement)
makeSeperator(chart.topBar)