Skip to content

Commit

Permalink
Fix localview things
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad committed Sep 5, 2024
1 parent 833f7bc commit c615827
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
15 changes: 5 additions & 10 deletions src/local_view/lview_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,11 @@ export class LViewRenderer {
}

private initLocalViewSidebar(): void {
/*
this.sdfvInstance.sidebar_set_title('Local View');
this.sdfvInstance.close_menu();
this.sdfvInstance.disable_menu_close();
this.sdfvInstance.linkedUI.infoSetTitle('Local View');
this.sdfvInstance.linkedUI.infoClear();
this.sdfvInstance.linkedUI.disableInfoClear();

const rawContents = this.sdfvInstance.sidebar_get_contents();
if (!rawContents)
return;
const contents = $(rawContents);
const contents = this.sdfvInstance.linkedUI.infoContentContainer;
contents.html(`
<div id="lview-sidebar">
<label for="map-playback-speed-input">
Expand Down Expand Up @@ -356,8 +352,7 @@ export class LViewRenderer {
this.chartContainer = $('#lview-chart-container');
this.sidebarContents = $('#lview-sidebar-contents');

this.sdfvInstance.sidebar_show();
*/
this.sdfvInstance.linkedUI.infoShow();
}

public clearGraphAccesses(g: Graph, redraw: boolean = true): void {
Expand Down
8 changes: 5 additions & 3 deletions src/renderer/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { LViewGraphParseError, LViewParser } from '../local_view/lview_parser';
import { LViewRenderer } from '../local_view/lview_renderer';
import { OverlayManager } from '../overlay_manager';
import { LogicalGroupOverlay } from '../overlays/logical_group_overlay';
import { ISDFV, SDFV } from '../sdfv';
import { ISDFV, SDFV, WebSDFV } from '../sdfv';
import {
boundingBox,
calculateBoundingBox,
Expand Down Expand Up @@ -4101,8 +4101,10 @@ export class SDFGRenderer extends EventEmitter {
if (!(this.sdfv_instance instanceof SDFV))
return;

//reload_file(this.sdfv_instance);
// TODO: exit correctly.
if (this.sdfv_instance instanceof WebSDFV) {
this.container.innerHTML = '';
this.sdfv_instance.setSDFG(this.sdfg);
}
}

public async localViewSelection(): Promise<void> {
Expand Down

0 comments on commit c615827

Please sign in to comment.