mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): add computed for stage scale
This commit is contained in:
@@ -6,7 +6,7 @@ import type { Coordinate, Dimensions, Rect, StageAttrs } from 'features/controlL
|
||||
import Konva from 'konva';
|
||||
import type { KonvaEventObject } from 'konva/lib/Node';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { atom } from 'nanostores';
|
||||
import { atom, computed } from 'nanostores';
|
||||
import type { Logger } from 'roarr';
|
||||
|
||||
type CanvasStageModuleConfig = {
|
||||
@@ -65,6 +65,7 @@ export class CanvasStageModule extends CanvasModuleBase {
|
||||
height: 0,
|
||||
scale: 0,
|
||||
});
|
||||
$scale = computed(this.$stageAttrs, (attrs) => attrs.scale);
|
||||
|
||||
subscriptions = new Set<() => void>();
|
||||
resizeObserver: ResizeObserver | null = null;
|
||||
|
||||
Reference in New Issue
Block a user