Skip to content

Commit

Permalink
Save and restore editor view state in Playground.
Browse files Browse the repository at this point in the history
  • Loading branch information
create3000 committed Jan 12, 2025
1 parent 2618c51 commit dd0c4eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/assets/playground/playground.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ class Playground

if (fullSize)
{
this .viewState = this .editor .saveViewState ();

this .editor .setModel (null);

$(".playground x3d-canvas") .css ("height", "100%");
Expand All @@ -394,6 +396,7 @@ class Playground
$(".playground .viewer-column2") .show ();

this .editor .setModel (this .model);
this .editor .restoreViewState (this .viewState);
}
}

Expand Down

0 comments on commit dd0c4eb

Please sign in to comment.