UNPKG

itk-viewer-bootstrap-ui

Version:

[![npm version](https://badge.fury.io/js/itk-viewer-bootstrap-ui.svg)](https://badge.fury.io/js/itk-viewer-bootstrap-ui) ![react-bootstrap version](https://img.shields.io/badge/React%20Bootstap-%3E=1.6.1-brightgreen.svg) [![Documentation Status](https://r

20 lines (16 loc) 555 B
function applyLabelNames(context, event) { const name = event.data.name const actorContext = context.images.actorContext.get(name) const labelNames = event.data.labelNames const optionsList = [] labelNames.forEach((name, label) => optionsList.push( `<option ${ label === actorContext.selectedLabel ? 'selected' : '' } value="${label}">${name}</option>` ) ) optionsList.unshift('<option value="all">All</option>') context.images.labelSelector.innerHTML = optionsList.join('') } export default applyLabelNames