', {
'class': 'row',
- }).appendTo(addItemRowContainer);
+ }).appendTo(attrTable);
$('
', {
'class': 'material-icons property-add-row-btn',
'text': 'playlist_add',
@@ -1465,7 +1607,8 @@ export function appendDataDescriptorTable(
const row = $('', {
class: 'row attr-table-row',
- }).appendTo(attrTable);
+ });
+ addItemButtonRow.before(row);
attributeTablePutEntry(
nameVal, defaultValues, newMetaType, descriptors,
undefined, undefined, row, true, true, true,
@@ -1476,7 +1619,7 @@ export function appendDataDescriptorTable(
newProp.deleteBtn.on('click', () => {
if (newProp.key) {
delete descriptors[newProp.key];
-
+ row.remove();
const sdfg = VSCodeRenderer
.getInstance()?.get_sdfg();
if (sdfg)
@@ -1484,6 +1627,10 @@ export function appendDataDescriptorTable(
}
});
}
+ const sdfg =
+ VSCodeRenderer.getInstance()?.get_sdfg();
+ if (sdfg)
+ vscodeWriteGraph(sdfg);
});
descriptors[nameVal] = defaultValues;
diff --git a/src/webclients/components/sdfv/vscode_sdfv.css b/src/webclients/components/sdfv/vscode_sdfv.css
index b5ecbc3..b432c35 100644
--- a/src/webclients/components/sdfv/vscode_sdfv.css
+++ b/src/webclients/components/sdfv/vscode_sdfv.css
@@ -331,14 +331,6 @@ pre.code {
cursor: pointer;
position: absolute;
margin: .4rem;
-}
-
-#expand-info-btn.expand-info-btn-top {
- top: 0;
- right: 0;
-}
-
-#expand-info-btn.expand-info-btn-bottom {
bottom: 0;
right: 0;
}
@@ -376,6 +368,7 @@ pre.code {
.attr-cat-toggle-btn>.attr-cat-toggle-btn-indicator {
float: right;
transition: all .5s;
+ transform: rotate(90deg);
}
.attr-cat-toggle-btn.active>.attr-cat-toggle-btn-indicator {
diff --git a/src/webclients/components/sdfv/vscode_sdfv.ts b/src/webclients/components/sdfv/vscode_sdfv.ts
index de1db6b..fd35675 100644
--- a/src/webclients/components/sdfv/vscode_sdfv.ts
+++ b/src/webclients/components/sdfv/vscode_sdfv.ts
@@ -78,6 +78,7 @@ import {
} from './transformation/transformation';
import {
appendDataDescriptorTable,
+ appendSymbolsTable,
generateAttributesTable
} from './utils/attributes_table';
import {
@@ -131,8 +132,8 @@ export class VSCodeSDFV extends SDFV {
private infoDragBar?: JQuery;
private draggingInfoBar: boolean = false;
- private infoBarLastVertWidth: string = '250px';
- private infoBarLastHorHeight: string = '200px';
+ private infoBarLastVertWidth: number = 350;
+ private infoBarLastHorHeight: number = 200;
private monaco: any | null = null;
private origSDFG: JsonSDFG | null = null;
@@ -185,8 +186,10 @@ export class VSCodeSDFV extends SDFV {
if (documentHeight) {
const newHeight = documentHeight - e.originalEvent.y;
if (newHeight < documentHeight) {
- this.infoBarLastHorHeight = newHeight.toString() + 'px';
- this.infoContainer?.height(this.infoBarLastHorHeight);
+ this.infoBarLastHorHeight = newHeight;
+ this.infoContainer?.height(
+ this.infoBarLastHorHeight.toString() + 'px'
+ );
}
}
}
@@ -197,13 +200,15 @@ export class VSCodeSDFV extends SDFV {
if (documentWidth) {
const newWidth = documentWidth - e.originalEvent.x;
if (newWidth < documentWidth) {
- this.infoBarLastVertWidth = newWidth.toString() + 'px';
- this.infoContainer?.width(this.infoBarLastVertWidth);
+ this.infoBarLastVertWidth = newWidth;
+ this.infoContainer?.width(newWidth.toString() + 'px');
- if (SDFVSettings.minimap)
+ if (SDFVSettings.minimap) {
+ $('#minimap').css('transition', '');
$('#minimap').css(
'right', (newWidth + 5).toString() + 'px'
);
+ }
}
}
}
@@ -231,27 +236,36 @@ export class VSCodeSDFV extends SDFV {
this.infoContainer?.addClass('offcanvas-bottom');
this.infoDragBar?.removeClass('gutter-vertical');
this.infoDragBar?.addClass('gutter-horizontal');
- this.expandInfoBtn?.removeClass('expand-info-btn-top');
- this.expandInfoBtn?.addClass('expand-info-btn-bottom');
+ this.expandInfoBtn?.html(
+ '' +
+ 'bottom_panel_open'
+ );
$(document).off('mousemove', infoChangeWidthHandler);
$(document).on('mousemove', infoChangeHeightHandler);
this.infoContainer?.width('100%');
- this.infoContainer?.height(this.infoBarLastHorHeight);
+ this.infoContainer?.height(
+ this.infoBarLastHorHeight.toString() + 'px'
+ );
} else {
this.infoContainer?.removeClass('offcanvas-bottom');
this.infoContainer?.addClass('offcanvas-end');
this.infoDragBar?.removeClass('gutter-horizontal');
this.infoDragBar?.addClass('gutter-vertical');
- this.expandInfoBtn?.removeClass('expand-info-btn-bottom');
- this.expandInfoBtn?.addClass('expand-info-btn-top');
+ this.expandInfoBtn?.html(
+ '' +
+ 'right_panel_open'
+ );
$(document).off('mousemove', infoChangeHeightHandler);
$(document).on('mousemove', infoChangeWidthHandler);
this.infoContainer?.height('100%');
- this.infoContainer?.width(this.infoBarLastVertWidth);
+ this.infoContainer?.width(
+ this.infoBarLastVertWidth.toString() + 'px'
+ );
}
infoBoxCheckStacking(this.infoContainer);
infoBoxCheckUncoverTopBar(this.infoContainer, this.topBar);
+ this.checkTrayCoversMinimap();
SDFVComponent.getInstance().invoke(
'setSplitDirection', [SPLIT_DIRECTION]
@@ -268,15 +282,45 @@ export class VSCodeSDFV extends SDFV {
this.expandInfoBtn?.show();
this.infoContainer?.removeClass('show');
VSCodeSDFV.getInstance().infoTrayExplicitlyHidden = true;
+ this.checkTrayCoversMinimap(true);
});
this.expandInfoBtn?.on('click', () => {
this.expandInfoBtn?.hide();
infoBoxCheckUncoverTopBar(this.infoContainer, this.topBar);
this.infoContainer?.addClass('show');
VSCodeSDFV.getInstance().infoTrayExplicitlyHidden = false;
+ this.checkTrayCoversMinimap(true);
});
}
+ private checkTrayCoversMinimap(animate: boolean = false): void {
+ if (SDFVSettings.minimap) {
+ if (SPLIT_DIRECTION === 'vertical' && this.infoBarLastVertWidth &&
+ !this.infoTrayExplicitlyHidden) {
+ try {
+ const pixels = this.infoBarLastVertWidth + 5;
+ if (animate)
+ $('#minimap').css(
+ 'transition', 'right 0.3s ease-in-out'
+ );
+ else
+ $('#minimap').css('transition', '');
+ $('#minimap').css('right', pixels.toString() + 'px');
+ } catch (e) {
+ console.warn(e);
+ }
+ } else {
+ if (animate)
+ $('#minimap').css(
+ 'transition', 'right 0.3s ease-in-out'
+ );
+ else
+ $('#minimap').css('transition', '');
+ $('#minimap').css('right', '5px');
+ }
+ }
+ }
+
public initSearch(): void {
const caseBtn = $('#search-case-sensitive-btn');
const searchInput = $('#search');
@@ -350,7 +394,17 @@ export class VSCodeSDFV extends SDFV {
const infoBox = $('#info-container');
infoBoxCheckUncoverTopBar(infoBox, $('#top-bar'));
infoBox.addClass('show');
+ this.checkTrayCoversMinimap(true);
}
+
+ if (SPLIT_DIRECTION === 'vertical')
+ this.infoContainer?.width(
+ this.infoBarLastVertWidth.toString() + 'px'
+ );
+ else
+ this.infoContainer?.height(
+ this.infoBarLastHorHeight.toString() + 'px'
+ );
}
/**
@@ -729,17 +783,27 @@ export class VSCodeSDFV extends SDFV {
);
}
} else if (elem instanceof SDFG) {
- if (elem.data && elem.data.attributes)
+ if (elem.data?.attributes) {
appendDataDescriptorTable(
contents, elem.data.attributes._arrays, elem.data
);
+ appendSymbolsTable(
+ contents, elem.data.attributes.symbols, elem.data
+ );
+ }
} else if (elem instanceof NestedSDFG) {
- if (elem.data && elem.data.node.attributes)
+ if (elem.data?.node?.attributes) {
appendDataDescriptorTable(
contents,
elem.data.node.attributes.sdfg.attributes._arrays,
elem.data.node.attributes.sdfg
);
+ appendSymbolsTable(
+ contents,
+ elem.data.node.attributes.sdfg.attributes.symbols,
+ elem.data.node.attributes.sdfg
+ );
+ }
}
infoBoxCheckStacking($('#info-container'));