Persist coordinates and dimensions in flow namespace#314
Persist coordinates and dimensions in flow namespace#314
Conversation
src/main/java/org/frankframework/flow/utility/XmlConfigurationUtils.java
Fixed
Show fixed
Hide fixed
|
| @PathVariable String projectName, @RequestBody ConfigurationDTO configurationDTO) | ||
| throws ConfigurationNotFoundException, InvalidXmlContentException, IOException, ProjectNotFoundException { | ||
| throws ConfigurationNotFoundException, InvalidXmlContentException, IOException, ProjectNotFoundException, | ||
| Exception, TransformerException { |
There was a problem hiding this comment.
If you catch Exception by itself there's no need for any child exceptions to be put here.
because Exception is the parent of all of these it will always give it back no matter what the child exception is
| throws IOException, ProjectNotFoundException, ConfigurationNotFoundException, Exception, | ||
| TransformerException { |
There was a problem hiding this comment.
If you catch Exception by itself there's no need for any child exceptions to be put here.
Because Exception is the parent of all of these it will always give it back no matter what the child exception is
| }> & { | ||
| width?: number | ||
| height?: number | ||
| } |
There was a problem hiding this comment.
A tip, use typescript's Utility Types if the types are reusable
In this case
type ElementPositions {
width: number
height:number
}
type FrankNodeType = {...} & Partial<ElementPositions>No need to change it now, but something to consider when looking back at these sorts of types
| const dagreGraph = new Dagre.graphlib.Graph() | ||
| dagreGraph.setDefaultEdgeLabel(() => ({})) | ||
| dagreGraph.setGraph({ rankdir: direction }) | ||
| dagreGraph.setGraph({ rankdir: direction, ranksep: 300, nodesep: 200 }) |
There was a problem hiding this comment.
Might be nice to have these as constant values so they can easily be found and changed
| type: 'Exit', | ||
| subtype: 'Exit', | ||
| attributes, | ||
| attributes: Object.keys(attributes).length > 0 ? attributes : {}, |
There was a problem hiding this comment.
this check is silly, if length is 0 than it'll be an empty object
| attributes: Object.keys(attributes).length > 0 ? attributes : {}, | |
| attributes, |
| type: 'Exit', | ||
| subtype: 'Exit', | ||
| attributes, | ||
| attributes: Object.keys(attributes).length > 0 ? attributes : {}, |
There was a problem hiding this comment.
| attributes: Object.keys(attributes).length > 0 ? attributes : {}, | |
| attributes, |



flow:x="xcoord"andflow:y="ycoord"flow:width="width"andflow:height="height"xmlns:flow="urn:frank-flow"is automatically added to all configurations that get saved that do not yet have the namespace