module/ui/viewers.js
function createIconButton(viewerElm, css, eventType) {
    const buttonElm = $.create('div', {'class': css})
    $.listen(
        buttonElm,
        {
            'click': (event) => {
                event.preventDefault()
                if (event.buttons === 0) {
                    $.dispatch(viewerElm, eventType)
                }
            }
        }
    )
    return buttonElm
}
function createIconButton(viewerElm, css, eventType) {
    const buttonElm = $.create('div', {'class': css})
    $.listen(
        buttonElm,
        {
            'click': (event) => {
                event.preventDefault()
                if (event.buttons === 0) {
                    $.dispatch(viewerElm, eventType)
                }
            }
        }
    )
    return buttonElm
}
-- Utils -- 
Shortcut for creating an icon button within a viewer.