mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
tidy(ui): getCanDraw code style
This commit is contained in:
committed by
Kent Keirsey
parent
25f19a35d7
commit
05e285c95a
@@ -296,13 +296,23 @@ export class CanvasToolModule extends CanvasModuleBase {
|
||||
getCanDraw = (): boolean => {
|
||||
if (this.manager.stateApi.getRenderedEntityCount() === 0) {
|
||||
return false;
|
||||
} else if (this.manager.$isBusy.get()) {
|
||||
return false;
|
||||
} else if (!this.manager.stateApi.getSelectedEntityAdapter()?.$isInteractable.get()) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.manager.$isBusy.get()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const selectedEntity = this.manager.stateApi.getSelectedEntityAdapter();
|
||||
|
||||
if (!selectedEntity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!selectedEntity.$isInteractable.get()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
onStagePointerEnter = async (e: KonvaEventObject<PointerEvent>) => {
|
||||
|
||||
Reference in New Issue
Block a user