show prev mask when hover rerun button
This commit is contained in:
parent
a85d87a744
commit
dcbba6d96d
@ -19,7 +19,12 @@ import { ThemeChanger } from './ThemeChanger'
|
|||||||
import SettingIcon from '../Settings/SettingIcon'
|
import SettingIcon from '../Settings/SettingIcon'
|
||||||
import PromptInput from './PromptInput'
|
import PromptInput from './PromptInput'
|
||||||
import CoffeeIcon from '../CoffeeIcon/CoffeeIcon'
|
import CoffeeIcon from '../CoffeeIcon/CoffeeIcon'
|
||||||
import emitter, { EVENT_CUSTOM_MASK, RERUN_LAST_MASK } from '../../event'
|
import emitter, {
|
||||||
|
DREAM_BUTTON_MOUSE_ENTER,
|
||||||
|
DREAM_BUTTON_MOUSE_LEAVE,
|
||||||
|
EVENT_CUSTOM_MASK,
|
||||||
|
RERUN_LAST_MASK,
|
||||||
|
} from '../../event'
|
||||||
import { useImage } from '../../utils'
|
import { useImage } from '../../utils'
|
||||||
import useHotKey from '../../hooks/useHotkey'
|
import useHotKey from '../../hooks/useHotkey'
|
||||||
|
|
||||||
@ -53,6 +58,14 @@ const Header = () => {
|
|||||||
emitter.emit(RERUN_LAST_MASK)
|
emitter.emit(RERUN_LAST_MASK)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
const onRerunMouseEnter = () => {
|
||||||
|
emitter.emit(DREAM_BUTTON_MOUSE_ENTER)
|
||||||
|
}
|
||||||
|
|
||||||
|
const onRerunMouseLeave = () => {
|
||||||
|
emitter.emit(DREAM_BUTTON_MOUSE_LEAVE)
|
||||||
|
}
|
||||||
|
|
||||||
useHotKey(
|
useHotKey(
|
||||||
'r',
|
'r',
|
||||||
() => {
|
() => {
|
||||||
@ -207,6 +220,8 @@ const Header = () => {
|
|||||||
disabled={isInpainting}
|
disabled={isInpainting}
|
||||||
toolTip="Rerun last mask [r]"
|
toolTip="Rerun last mask [r]"
|
||||||
onClick={handleRerunLastMask}
|
onClick={handleRerunLastMask}
|
||||||
|
onMouseEnter={onRerunMouseEnter}
|
||||||
|
onMouseLeave={onRerunMouseLeave}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user