try to draw 1000*1000 svg grig
This commit is contained in:
parent
289e1eac2d
commit
4c628de03a
|
@ -8,9 +8,11 @@ function createElem(type,attributes){
|
||||||
|
|
||||||
|
|
||||||
function tron(bot1,bot2,xdcheck){
|
function tron(bot1,bot2,xdcheck){
|
||||||
var mapImg = createElem('svg',{'version':'1.1','alt' : 'map','width':'200','height':'200','xmlns':'http://www.w3.org/2000/svg','viewBox':'0 0 20 20'});
|
|
||||||
// "circle" may be any tag name
|
var mapImg = document.getElementById("map");
|
||||||
mapImg.innerHTML = ' <rect id="rect1" x="10" y="10" width="50" height="80" style="stroke:#000000; fill:none;"/>';
|
|
||||||
document.getElementById('mainArticle').appendChild(mapImg);
|
var rect=createElem('rect',{'x':'10','y':'10','width':'50','height':'80','style':'stroke:#000000; fill:none;'});
|
||||||
|
|
||||||
|
mapImg.appendChild(rect);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ $bots=get_Bots_Array('tron');
|
||||||
</p>
|
</p>
|
||||||
<p><input type="checkbox" id="fullLogs"/><label for="fullLogs">view the full logs</label></p>
|
<p><input type="checkbox" id="fullLogs"/><label for="fullLogs">view the full logs</label></p>
|
||||||
<p><input id="fightButton" type="button" value="<?php echo $lang['FIGHT']; ?>" onclick="tron(document.getElementById('bot1').value,document.getElementById('bot2').value,'<?php echo xd_check_input(2); ?>',0);"></p>
|
<p><input id="fightButton" type="button" value="<?php echo $lang['FIGHT']; ?>" onclick="tron(document.getElementById('bot1').value,document.getElementById('bot2').value,'<?php echo xd_check_input(2); ?>',0);"></p>
|
||||||
<svg width="100" height="100">
|
<svg id="map" width="1000" height="1000">
|
||||||
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
|
|
||||||
</svg>
|
</svg>
|
||||||
</article>
|
</article>
|
Loading…
Reference in New Issue
Block a user