mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
fix(ui): bbox interactability
This commit is contained in:
@@ -173,6 +173,9 @@ export class CanvasBboxModule extends CanvasModuleBase {
|
||||
|
||||
// Listen for the bbox overlay setting to update the overlay's visibility
|
||||
this.subscriptions.add(this.manager.stateApi.createStoreSubscription(selectBboxOverlay, this.render));
|
||||
|
||||
// Update on busy state changes
|
||||
this.subscriptions.add(this.manager.$isBusy.listen(this.render));
|
||||
}
|
||||
|
||||
initialize = () => {
|
||||
|
||||
@@ -141,19 +141,21 @@ export class CanvasToolModule extends CanvasModuleBase {
|
||||
|
||||
if (tool === 'view') {
|
||||
stage.setCursor(isMouseDown ? 'grabbing' : 'grab');
|
||||
} else if (this.manager.stateApi.getRenderedEntityCount() === 0) {
|
||||
stage.setCursor('not-allowed');
|
||||
} else if (this.manager.stateApi.$isTransforming.get()) {
|
||||
stage.setCursor('default');
|
||||
} else if (this.manager.stateApi.$isFiltering.get()) {
|
||||
stage.setCursor('not-allowed');
|
||||
} else if (this.manager.stagingArea.$isStaging.get()) {
|
||||
stage.setCursor('not-allowed');
|
||||
} else if (tool === 'bbox') {
|
||||
stage.setCursor('default');
|
||||
} else if (this.manager.stateApi.getRenderedEntityCount() === 0) {
|
||||
stage.setCursor('not-allowed');
|
||||
} else if (!this.manager.stateApi.getSelectedEntityAdapter()?.$isInteractable.get()) {
|
||||
stage.setCursor('not-allowed');
|
||||
} else if (tool === 'colorPicker' || tool === 'brush' || tool === 'eraser') {
|
||||
stage.setCursor('none');
|
||||
} else if (tool === 'move' || tool === 'bbox') {
|
||||
} else if (tool === 'move') {
|
||||
stage.setCursor('default');
|
||||
} else if (tool === 'rect') {
|
||||
stage.setCursor('crosshair');
|
||||
|
||||
Reference in New Issue
Block a user