Scenes: Fixes layout when the editor is active (#52291)

This commit is contained in:
Torkel Ödegaard 2022-07-15 02:08:40 +02:00 committed by GitHub
parent 8b7516bc55
commit 85309f4e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -55,8 +55,10 @@ function SceneRenderer({ model }: SceneComponentProps<Scene>) {
return (
<Page navId="scenes" layout={PageLayoutType.Dashboard} toolbar={pageToolbar}>
<layout.Component model={layout} isEditing={isEditing} />
{$editor && <$editor.Component model={$editor} isEditing={isEditing} />}
<div style={{ flexGrow: 1, display: 'flex', gap: '8px', overflow: 'auto' }}>
<layout.Component model={layout} isEditing={isEditing} />
{$editor && <$editor.Component model={$editor} isEditing={isEditing} />}
</div>
</Page>
);
}

View File

@ -30,6 +30,7 @@ export class SceneToolbarInput extends SceneObjectBase<SceneToolbarInputState> {
return (
<Input
defaultValue={state.value}
width={8}
onBlur={(evt) => {
model.state.onChange(parseInt(evt.currentTarget.value, 10));
}}