aces / brainbrowser

Web-based visualization tools for neurological data.
https://brainbrowser.cbrain.mcgill.ca/
GNU Affero General Public License v3.0
351 stars 122 forks source link

Add a range check to avoid weird wrapping effect with negative slice_num #285

Closed rdvincent closed 8 years ago

rdvincent commented 8 years ago

@natacha-beck: While working on the BigBrain demo I found that the volume viewer has a weird bug where if you drag the cursor all the way to the left, the slice can "wrap around" to the other side of the image. I tracked it down to the fact that the UI can generate negative values for the slice number. I added a range check in minc.js that should prevent the problem for all of the volume formats.

natacha-beck commented 8 years ago

@rdvincent : Sorry I totally forgot your PR... Now it's merged.