Tabs are open documents: Scene, Game and Plugins stay as fixed tabs, every other asset opens in its own tab (double click or Enter in the asset panel, on creation, from the list button), several assets of one kind can be open at once, a tab is labelled with its kind dimmed before the name, cut at 160 px and renamed with its asset, closes with its x or a middle click and goes away when its asset is deleted; a tab always shows its own document instead of following the selection, the picker in the tab head is gone, zoom and scroll are kept per document for the session and dropped on close, a double click on a call node stays in the same tab with breadcrumbs per tab; one editor per kind is switched between documents, the placement rules live in the pure module documents.ts, and the test hook showTab stays as a compatibility path; new e2e module 44 documents (#171)
game-maker / gate (push) Successful in 1m59s
game-maker / suite (push) Successful in 6m53s

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5 committed 2026-09-19 15:49:54 +02:00
1 parent 4f546c0e08
commit cc285af10a
33 files changed
+895 -225

No files matched your search

+12
View File
@@ -115,6 +115,18 @@ export class TileCanvas extends Widget {
this.redraw();
}
saveView(): { view: GraphView; needsFit: boolean } {
return { view: { pan: { ...this.view.pan }, zoom: this.view.zoom }, needsFit: this.needsFit };
}
restoreView(saved: unknown): void {
const { view, needsFit } = saved as { view: GraphView; needsFit: boolean };
if (needsFit) return;
this.view = { pan: { ...view.pan }, zoom: view.zoom };
this.needsFit = false;
this.redraw();
}
/** Advances the animation; only called while the tab is visible (see `Editor.tick`). */
tick(dt: number): void {
if (!this.animates) return;
+3 -3
View File
@@ -25,7 +25,7 @@ export class TileEditor extends AssetTabEditor<TileAsset, TileCanvas> {
readonly strip: PictureStrip;
constructor(state: EditorState) {
super(state, { noun: 'Tile', infoWidth: INFO_WIDTH });
super(state, { infoWidth: INFO_WIDTH });
this.kindPicker = new Dropdown('—', { width: KIND_WIDTH, onClick: () => this.openKindPicker() });
this.strip = new PictureStrip(state);
this.mount(new TileCanvas(state), [this.kindPicker]);
@@ -49,11 +49,11 @@ export class TileEditor extends AssetTabEditor<TileAsset, TileCanvas> {
return this.canvas.animates;
}
protected override selectedId(): string {
override selectedId(): string {
return this.state.selectedTileId ?? '';
}
protected override isMine(asset: Asset): asset is TileAsset {
override isMine(asset: Asset): asset is TileAsset {
return asset.type === 'tile';
}