Skip to content

Commit

Permalink
14 minor UI adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
wuetherich committed Dec 29, 2019
1 parent 35fd2c4 commit 4fbb57b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion slizaa-web/app/src/components/dsm/DSM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ export class DSM extends React.Component<IDsmProps, {}> {
renderingContext.translate(-(xPosition + 9), -(yPosition + 9));
renderingContext.drawImage(img, this.verticalSideMarkerWidth + this.getHorizontalSliceSize(x) + (this.getBoxSize().getHorizontalBoxSize() - 18) / 2, (this.getBoxSize().getVerticalBoxSize() - 18) / 2);
renderingContext.restore();
textPadding = 15;
textPadding = 22;
}

// step 4: re-draw the text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class SlizaaDependencyTree extends React.Component<ISlizaaDependencyTreeP

return <Query<ReferencedNodesForAggregatedDependencies, ReferencedNodesForAggregatedDependenciesVariables>
query={GQ_REFERENCED_NODES_FOR_AGGREGATED_DEPENDENCY}
fetchPolicy={"cache-first"}
fetchPolicy={"no-cache"}
variables={variables}>

{({loading, data, error}) => {
Expand All @@ -75,15 +75,16 @@ export class SlizaaDependencyTree extends React.Component<ISlizaaDependencyTreeP
return <h1>{error.message}</h1>
}


const markedSourceNodeIds = !data || !data.hierarchicalGraph || !data.hierarchicalGraph.dependencySetForAggregatedDependency || this.state.selectedNodeIds.length === 0 || this.state.selectedNodesType === NodeType.SOURCE ? undefined : data.hierarchicalGraph.dependencySetForAggregatedDependency.referencedNodeIds;
const markedTargetNodeIds = !data || !data.hierarchicalGraph || !data.hierarchicalGraph.dependencySetForAggregatedDependency || this.state.selectedNodeIds.length === 0 || this.state.selectedNodesType === NodeType.TARGET ? undefined : data.hierarchicalGraph.dependencySetForAggregatedDependency.referencedNodeIds;

// TODO: merge with expanded IDs
const sourcePredecessors: string[] = !data || !data.hierarchicalGraph || data.hierarchicalGraph.sourcePredecessors == null ? [] : data.hierarchicalGraph.sourcePredecessors.predecessors.map((p) => p.id);
const targetPredecessors: string[] = !data || !data.hierarchicalGraph || data.hierarchicalGraph.targetPredecessors == null ? [] : data.hierarchicalGraph.targetPredecessors.predecessors.map((p) => p.id);

const combinedExpanedSourceNodeIds = sourcePredecessors.concat(this.state.expandedSourceNodeIds);
const combinedExpanedTargetNodeIds = targetPredecessors.concat(this.state.expandedTargetNodeIds);
const combinedExpandedSourceNodeIds = sourcePredecessors.concat(this.state.expandedSourceNodeIds);
const combinedExpandedTargetNodeIds = targetPredecessors.concat(this.state.expandedTargetNodeIds);

//
const stylesNoEvents: CSSProperties = {pointerEvents: loading ? "none" : "unset"};
Expand All @@ -99,7 +100,7 @@ export class SlizaaDependencyTree extends React.Component<ISlizaaDependencyTreeP
rootNode={this.state.sourceNode}
onExpand={this.onSourceExpand}
onSelect={this.onSourceSelect}
expandedKeys={combinedExpanedSourceNodeIds}
expandedKeys={combinedExpandedSourceNodeIds}
selectedKeys={selectedSourceNodeIds}
markedKeys={markedSourceNodeIds}
loadData={this.loadChildrenFilteredByDependencySource(this.props.client, this.props.sourceNodeId, this.props.targetNodeId)}
Expand All @@ -112,7 +113,7 @@ export class SlizaaDependencyTree extends React.Component<ISlizaaDependencyTreeP
rootNode={this.state.targetNode}
onExpand={this.onTargetExpand}
onSelect={this.onTargetSelect}
expandedKeys={combinedExpanedTargetNodeIds}
expandedKeys={combinedExpandedTargetNodeIds}
selectedKeys={selectedTargetNodeIds}
markedKeys={markedTargetNodeIds}
loadData={this.loadChildrenFilteredByDependencyTarget(this.props.client, this.props.sourceNodeId, this.props.targetNodeId)}
Expand Down

0 comments on commit 4fbb57b

Please sign in to comment.