57 lines
1.2 KiB
JavaScript
57 lines
1.2 KiB
JavaScript
const addHS = new OO.ui.ButtonWidget({
|
|
icon: 'mapPinAdd',
|
|
label: 'Add annotation',
|
|
invisibleLabel: true,
|
|
class: 'edit-button'
|
|
})
|
|
addHS.on('click', readyAddHotspot)
|
|
addHS.setDisabled(true)
|
|
console.log(addHS.classList)
|
|
|
|
const updateHS = new OO.ui.ButtonWidget({
|
|
icon: 'reload',
|
|
label: 'Update annotations',
|
|
invisibleLabel: true
|
|
})
|
|
updateHS.on('click', readMetadata)
|
|
|
|
const deleteHS = new OO.ui.ButtonWidget({
|
|
icon: 'cancel',
|
|
label: 'Delete annotation',
|
|
invisibleLabel: true
|
|
})
|
|
deleteHS.on('click', readyDelHotspot)
|
|
|
|
const hotspotButtons = new OO.ui.ButtonGroupWidget( {
|
|
items: [ addHS, updateHS, deleteHS ]
|
|
} );
|
|
|
|
const downloadViewerImage = new OO.ui.ButtonWidget({
|
|
icon: 'imageAdd',
|
|
label: 'Download current image',
|
|
invisibleLabel: true
|
|
})
|
|
downloadViewerImage.on('click', () => {
|
|
downloadImage("TempTitle.glb")
|
|
})
|
|
|
|
const setView = new OO.ui.ButtonWidget({
|
|
icon: 'camera',
|
|
label: 'Set Initial View',
|
|
invisibleLabel: true
|
|
})
|
|
setView.on('click', writeCameraOrbit)
|
|
|
|
const cameraButtons = new OO.ui.ButtonGroupWidget( {
|
|
items: [ downloadViewerImage, setView ]
|
|
} );
|
|
|
|
const modelMenu = new OO.ui.HorizontalLayout( {
|
|
items: [
|
|
hotspotButtons,
|
|
cameraButtons
|
|
],
|
|
id: 'edit-model-menu'
|
|
});
|
|
|
|
$('#wikiPreview').after(modelMenu.$element); |