Hello,
I am using d3.js to create SVG animation. The javascript(below) is setup to run on page load of svg page. If initial app start page is set to the svg page, everything works perfectly. However, if the start page is set to my login screen, and then I navigate to svg page via menu select, the elements are not showing up. I used both load, and page show events.
Below is the code I am trying to run on load of svg page:
$('td[name="mobilegridcell_8"]').append('');
var svgtest=d3.select("#Testsvg")
.append("svg:svg")
.attr("width", 162)
.attr("height", 158);
var rect = svgtest.append("path")
.attr("d", rightRoundedRect(50, 0, 80, 160, 10))
.attr("fill", "#fff");
function rightRoundedRect(x, y, width, height, radius) {
return "M" + x + "," + y
+ "h" + (width - radius)
+ "a" + radius + "," + radius + " 0 0 1 " + radius + "," + radius
+ "v" + (height - 2 * radius)
+ "a" + radius + "," + radius + " 0 0 1 " + -radius + "," + radius
+ "h" + (radius - width)
+ "a" + -radius + "," + -radius + " 0 0 1 " + -radius + "," + -radius
- "v" + -(height - 2 * radius)
- "a" + -radius + "," + radius + " 0 0 1 " + radius + "," + -radius;
}
- "a" + -radius + "," + radius + " 0 0 1 " + radius + "," + -radius;