algairim commented on a change in pull request #314:
URL: https://github.com/apache/brooklyn-ui/pull/314#discussion_r804822612
##########
File path: ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
##########
@@ -831,26 +832,45 @@ export function D3Blueprint(container, options) {
let relationArcs = _relationArcs.selectAll('.relation').data(arcsData,
(d) => getPathId(d));
+ // Returns node coordinates with adjustment for member spec rotation
if present.
+ const getNodeCoordinates = (entity) => {
+ let _node = nodeForEntity(entity);
+ let _x = _node.x;
+ let _y = _node.y;
+
+ if (entity.isMemberSpec()) {
+ _y += _configHolder.nodes.memberspec.circle.cy;
+ if (entity.parent.hasChildren()) {
+ // follow the rotation as for 'specNodeData'
+ let _radius = _configHolder.nodes.memberspec.circle.cy;
+ let _theta = Math.PI * 2 *
_configHolder.nodes.memberspec.rotationAngle / 360;
+ _x += _radius * Math.cos(_theta);
+ _y -= _radius - Math.abs(_radius * Math.sin(_theta));
Review comment:
This is an adjustment required to move arcs along with member spec node
when it is rotated.
--
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]