Skip to content

Commit

Permalink
feat: add scale bounds to color palette
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrokohler committed Nov 25, 2024
1 parent f4a5732 commit 46d9505
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4523,7 +4523,16 @@ class VolumeImageViewer {
context.fillStyle = `rgb(${r}, ${g}, ${b})`
context.fillRect(0, height / colors.length * j, width, 1)
}

const upperBound = document.createElement('span');
upperBound.innerHTML = '255';

const lowerBound = document.createElement('span');
lowerBound.innerHTML = '0';

overlayElement.appendChild(upperBound)
overlayElement.appendChild(canvas)
overlayElement.appendChild(lowerBound)

const parentElement = overlayElement.parentNode
parentElement.style.display = 'inline'
Expand Down

0 comments on commit 46d9505

Please sign in to comment.