From dbe245db5b0ea9e2b6b4c3637ec6b560bdc02652 Mon Sep 17 00:00:00 2001 From: Gnieark Date: Wed, 29 Jun 2016 11:42:18 +0200 Subject: [PATCH] try to draw 1000*1000 svg grig --- src/arenas/tron/js.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/arenas/tron/js.js b/src/arenas/tron/js.js index 060fa27..d691dac 100644 --- a/src/arenas/tron/js.js +++ b/src/arenas/tron/js.js @@ -15,15 +15,8 @@ function tron(bot1,bot2,xdcheck){ var mapImg = createElem('svg',{'alt' : 'map','width':'200','height':'200'}); // "circle" may be any tag name - var shape = document.createElementNS("http://www.w3.org/2000/svg", "circle"); - // Set any attributes as desired - shape.setAttribute("cx", 25); - shape.setAttribute("cy", 25); - shape.setAttribute("r", 20); - shape.setAttribute("fill", "green"); - // Add to a parent node; document.documentElement should be the root svg element. - // Acquiring a parent element with document.getElementById() would be safest. - mapImg.appendChild(shape); + mapImg.innerHTML = ''; + document.getElementById('fightResult').appendChild(mapImg); }