Skip to content

Commit

Permalink
fix(protocol-designer): add setHovered functions to clear unnecessary…
Browse files Browse the repository at this point in the history
… item (#16538)

* fix(protocol-designer): add setHovered functions to clear unnecessary item
  • Loading branch information
koji authored Oct 21, 2024
1 parent 397f079 commit d2829dd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ export function DeckSetupTools(props: DeckSetupToolsProps): JSX.Element | null {
}

const handleClear = (): void => {
onDeckProps?.setHoveredModule(null)
onDeckProps?.setHoveredFixture(null)
if (slot !== 'offDeck') {
// clear module from slot
if (createdModuleForSlot != null) {
Expand Down Expand Up @@ -312,6 +314,7 @@ export function DeckSetupTools(props: DeckSetupToolsProps): JSX.Element | null {
}}
setHovered={() => {
if (onDeckProps?.setHoveredModule != null) {
onDeckProps.setHoveredFixture(null)
onDeckProps.setHoveredModule(model)
}
}}
Expand Down Expand Up @@ -390,6 +393,7 @@ export function DeckSetupTools(props: DeckSetupToolsProps): JSX.Element | null {
}}
setHovered={() => {
if (onDeckProps?.setHoveredFixture != null) {
onDeckProps.setHoveredModule(null)
onDeckProps.setHoveredFixture(fixture)
}
}}
Expand Down

0 comments on commit d2829dd

Please sign in to comment.