Skip to content

Commit 41c38d6

Browse files
committed
fix(hotspot): avoid setting hovercolor in view and eval mode PIE-435
1 parent abbec3a commit 41c38d6

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

packages/hotspot/src/hotspot/index.jsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,16 @@ class HotspotComponent extends React.Component {
9494
} = this.props;
9595
const { showCorrect } = this.state;
9696
const isEvaluateMode = mode === 'evaluate';
97+
const isGatherMode = mode === 'gather';
9798
const showCorrectAnswerToggle = isEvaluateMode && !responseCorrect;
9899
const showRationale = rationale && (hasText(rationale) || hasMedia(rationale));
99100
const showTeacherInstructions =
100101
teacherInstructions && (hasText(teacherInstructions) || hasMedia(teacherInstructions));
101102

102103
return (
103-
<StyledUiLayout
104-
extraCSSRules={extraCSSRules}
105-
id={'main-container'}
106-
fontSizeFactor={fontSizeFactor}
107-
>
104+
<StyledUiLayout extraCSSRules={extraCSSRules} id={'main-container'} fontSizeFactor={fontSizeFactor}>
108105
{showTeacherInstructions && (
109-
<StyledCollapsible
110-
labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}
111-
>
106+
<StyledCollapsible labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}>
112107
<PreviewPrompt className="prompt" prompt={teacherInstructions} />
113108
</StyledCollapsible>
114109
)}
@@ -138,7 +133,7 @@ class HotspotComponent extends React.Component {
138133
dimensions={dimensions}
139134
imageUrl={imageUrl}
140135
hotspotColor={hotspotColor}
141-
hoverOutlineColor={hoverOutlineColor}
136+
hoverOutlineColor={isGatherMode ? hoverOutlineColor : undefined}
142137
selectedHotspotColor={selectedHotspotColor}
143138
multipleCorrect={multipleCorrect}
144139
outlineColor={outlineColor}

0 commit comments

Comments
 (0)