Use svg polyline element attributes instead of CSS properties to set lines color and width

This commit is contained in:
Ophir LOJKINE 2013-11-14 11:09:45 +01:00
parent 5bdf54782b
commit 134a017095

View file

@ -107,8 +107,8 @@
function createLine(lineData) {
var line = Tools.createSVGElement("polyline");
line.id = lineData.id;
line.style.stroke = lineData.color || "black";
line.style.strokeWidth = lineData.size || 3;
line.setAttribute("stroke", lineData.color);
line.setAttribute("stroke-width", lineData.size);
svg.appendChild(line);
return line;
}