itk-viewer-material-ui
Version:
[](https://badge.fury.io/js/itk-viewer-material-ui)
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