Add disable hs buttons when 0 annotations
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This commit is contained in:
@@ -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 = {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user