try to draw 1000*1000 svg grig
This commit is contained in:
parent
4c628de03a
commit
b219848f50
|
@ -4,15 +4,20 @@ function createElem(type,attributes){
|
||||||
{elem.setAttribute(i,attributes[i]);}
|
{elem.setAttribute(i,attributes[i]);}
|
||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
|
function createElemNs(type,attributes){
|
||||||
|
var elem=document.createElement(type);
|
||||||
|
for (var i in attributes)
|
||||||
|
{elem.setAttributeNs(i,attributes[i]);}
|
||||||
|
return elem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function tron(bot1,bot2,xdcheck){
|
function tron(bot1,bot2,xdcheck){
|
||||||
|
|
||||||
var mapImg = document.getElementById("map");
|
var svg = document.getElementById("map");
|
||||||
|
var svgDoc = svg.contentDocument;
|
||||||
|
var rect=createElemNs('rect',{'x':'10','y':'10','width':'50','height':'80','style':'stroke:#000000; fill:none;'});
|
||||||
|
|
||||||
var rect=createElem('rect',{'x':'10','y':'10','width':'50','height':'80','style':'stroke:#000000; fill:none;'});
|
svgDoc.appendChild(rect);
|
||||||
|
|
||||||
mapImg.appendChild(rect);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user