itk-viewer-reference-ui
Version:
Reference UI for itk-viewer
10 lines (8 loc) • 318 B
JavaScript
function toggleBackgroundColor(context) {
context.main.selectedBackgroundColor =
(context.main.selectedBackgroundColor + 1) %
context.main.backgroundColors.length
context.main.backgroundColor =
context.main.backgroundColors[context.main.selectedBackgroundColor]
}
export default toggleBackgroundColor