Skip to content

Commit 395e22d

Browse files
committed
fix: display of multiple blocks per region
1 parent 40fbb32 commit 395e22d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

frontend/packages/common/MLIRViewer.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,20 @@ const renderType = ({data, selectionState, onOpClick}) => {
8181
}
8282

8383
const renderBlock = ({data, selectionState, onOpClick}) => {
84+
let children=data.children
85+
if (data.eCB){
86+
children=children.slice(1,-1)
87+
}else{
88+
children=children.slice(1)
89+
}
8490
return (<div style={{display: "inline"}}>
85-
{"{"}
91+
{data.sCB?"{":<Render data={data.children[0]} selectionState={selectionState} onOpClick={onOpClick}/>}
8692
<div style={{paddingLeft: "10px"}}>
87-
{data.children.slice(1, -1).map((child, index) => {
93+
{children.map((child, index) => {
8894
return (<Render data={child} selectionState={selectionState} onOpClick={onOpClick}></Render>)
8995
})}
9096
</div>
91-
{"}"}
97+
{data.eCB?"}":""}
9298
</div>)
9399
}
94100

frontend/packages/insights/src/App.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,6 @@ const App = () => {
208208
<Col className="p-3" style={{backgroundColor: '#f8f9fa'}}>
209209
{hasLayers && <div><Tabs activeKey={activeRightTab} onSelect={handleRightTabSelect}>
210210
<Tab eventKey="mlir_relalg" title="RelAlg">
211-
<MLIRViewer height={2 * (window.innerHeight - 90) / 3}
212-
width={(window.innerWidth - 100) / 2}
213-
layer={relalgMLIRData} selectedOps={selectedOps}></MLIRViewer>
214211
</Tab>
215212
<Tab eventKey="mlir_subop" title="SubOp">
216213

0 commit comments

Comments
 (0)