svg - Position of a custom shape using dagre -



svg - Position of a custom shape using dagre -

i'm trying create custom shape , set x , y axis on svg, far got done on top of element have transform attribute belongs grouping (g) references node, tried alter attribute setting custom transform without luck.

my question is, how can alter x , y position whole node?

render.shapes().task = function(parent, bbox, node) { var shapesvg = parent.insert('rect', ':first-child') .attr('x', node.x) .attr('y', node.y) .attr('width', bbox.width) .attr('height', bbox.height); parent.attr('transform', 'translate(' + node.x + ',' + node.y + ')'); node.intersect = function(point) { homecoming dagred3.intersect.rect(node, point); }; homecoming shapesvg; };

for generating node:

g.setnode(string(element._id), { label:element.flowelement.meta.name, shape:element.type, x:meta.x, y:meta.y, width:meta.width, height:meta.height }

the translate 65,152 , want same x , y of object want alter kid groups (including wrappers labels) well.

look @ image reference

svg d3.js dagre dagre-d3

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -