Skip to content

Commit

Permalink
Merge pull request #1300 from girder/band-bug
Browse files Browse the repository at this point in the history
Band Behavior
  • Loading branch information
annehaley authored Sep 14, 2023
2 parents 81c5ca7 + f83feb3 commit 9e2e7f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default Vue.extend({
{id: 2, name: 'Channel Compositing'}
);
}
if (this.metadata.bandCount > 1) {
if (this.metadata.bandCount) {
this.sliderModes.push(
{id: 3, name: 'Band Compositing'}
);
Expand Down Expand Up @@ -250,24 +250,24 @@ export default Vue.extend({
<!-- Use styling instead of v-if to make each invisible so that the components are not unmounted -->
<div class="image-frame-simple-control">
<composite-layers
v-if="imageMetadata.channels && modesShown[2]"
v-if="metadata.channels && modesShown[2]"
key="channels"
:item-id="itemId"
:current-frame="currentFrame"
:current-style="style[2]"
:layers="imageMetadata.channels"
:layer-map="imageMetadata.channelmap"
:layers="metadata.channels"
:layer-map="metadata.channelmap"
:active="currentModeId === 2"
:class="currentModeId === 2 ? '' : 'invisible'"
@updateStyle="(style) => updateStyle(2, style)"
/>
<composite-layers
v-if="imageMetadata.bands && modesShown[3]"
v-if="metadata.bands && modesShown[3]"
key="bands"
:item-id="itemId"
:current-frame="currentFrame"
:current-style="style[3]"
:layers="imageMetadata.bands"
:layers="metadata.bands"
:layer-map="undefined"
:active="currentModeId === 3"
:class="currentModeId === 3 ? '' : 'invisible'"
Expand Down
6 changes: 5 additions & 1 deletion girder/girder_large_image/web_client/vue/utils/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ export const CHANNEL_COLORS = {
'^CY3(|[^\d].*)$': '#FF8000', // eslint-disable-line
'^CY5(|[^\d].*)$': '#FF00FF', // eslint-disable-line
'^YFP.*$': '#00FF00',
'^GFP.*$': '#00FF00'
'^GFP.*$': '#00FF00',
'^red$': '#FF0000',
'^green$': '#00FF00',
'^blue$': '#0000FF',
'^gr[ae]y(|scale)$': '#FFFFFF'
};

export const OTHER_COLORS = [
Expand Down

0 comments on commit 9e2e7f4

Please sign in to comment.