ljmotta commented on issue #1074:
URL: 
https://github.com/apache/incubator-kie-issues/issues/1074#issuecomment-2069889510

   @jomarko The `store` is where the DMN Editor state is located. You can take 
a look into the `Store.ts` and there we'll have the values and the methods to 
retrieve the information. It's important to always use the `computed` methods, 
so the component will only re-render when the specific value was changed, 
minimizing the re-renders.
   
   You can retrieve the node minimal size by doing something like this inside 
the `setBounds` method:
   ```ts
   const node = nodeIds.map((nodeId) =>
     
s.computed(s).getDiagramData(externalModelsByNamespace).nodesById.get(nodeId)
   )[index];
   if (node === undefined) {
     throw new Error(`DMN Element with index ${index} is not a Node.`);
   }
   const minNodeSize = MIN_NODE_SIZES[node.type as NodeType]({ snapGrid: 
s.diagram.snapGrid, isAlternativeInputDataShape: 
s.computed(s).isAlternativeInputDataShape() });
   
   ``` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to