Add disable hs buttons when 0 annotations

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
2025-05-03 20:04:00 -07:00
parent 9953dff4a0
commit 859183fe2e
2 changed files with 18 additions and 7 deletions

View File

@@ -19,6 +19,12 @@ extractMvconfig = function() {
if (mvconfig.annotations === undefined) {
mvconfig.annotations = {}
}
const mView = $('model-viewer')[0]
const hsButtons = [...mView.parentElement.querySelectorAll('.disable-on-none')]
hsButtons.forEach( mb => {
mb.toggleAttribute('disabled',$.isEmptyObject(mvconfig.annotations))
})
if (mvconfig.annotationSets === undefined) {
mvconfig.annotationSets = {}
}