Query |
Response |
In your sample project, if i drag one more hexagon and try to put image in it, the code doesn't work. It works only for the first time. |
We have fixed the issue in the sample and provided the modified sample below. |
Also, in generateSVGtemplate function you have used "Path._absolutePath".
In my project, hexagon is one of the child in a group node which doesn't have any property named _absolutePath. So, I have put the static data("M 25 100 L 0 50 L 25 0 L 75 0 L 100 50 L 75 100 L 25 100 z") from your sample project which works fine for the first photo
|
Sorry for the inconvenience
you can set the node’s property pathData in the path element instead of _absolutePath.
Code example:
var pathelement = document.createElementNS(xmlns, "path");
dUtils.attr(pathelement, { 'fill': 'url(#' + patternid + ')', 'stroke': "black", 'stroke-width': "1", 'd': pathnode.pathData })
Also we have used Getpath method in the sample level to get the path bounds. In this method, you can pass the pathData. We have set these bounds to the image width and height.
code example:
var bounds = Getpath(pathnode.pathData);
var image = document.createElementNS(xmlns, "image");
//set an attribute to the image element
dUtils.attr(image, { id: imagenode.name + ej.datavisualization.Diagram.Util.randomId(), width: bounds.width, height: bounds.height, preserveAspectRatio: "none" });
|
Query |
Response |
The previous code worked fine after deleting the while loop from "generateSVGtemplate" function. However, I am not able export or print the diagram with the updated node.
Export didn't work in the sample project as well. |
Currently we don’t have support to “Export Diagram with native node support”. We have already logged “Export Diagram with native node support” as a feature. |
Also, I want to rotate the Image as i have a rotated hexagon as shown in picture in my last attachment.(Tried rotateAngle which did not work.) |
Please set node’s rotateAngle property for an native node which we create at runtime in the drop event.
Code example:
function drop(args) {
. . . . .
. . . . .
var node = { name: "native" + ej.datavisualization.Diagram.Util.randomId(), rotateAngle:50, type: "native", templateId: templateID, scale: "stretch" };
diagram.add(node);
}
|
1) In your Sample Project, only hexagon rotates but not the image.i want the image to be rotated as well. |
We have updated the response for this query with the incident # I170853.Please check in to that incident #I170853 for the further details. |