try to draw 1000*1000 svg grig
This commit is contained in:
parent
50f1686af2
commit
64f9faf277
|
@ -13,10 +13,14 @@ function createElemNS(type,attributes){
|
|||
|
||||
|
||||
function tron(bot1,bot2,xdcheck){
|
||||
|
||||
//var svgDoc = svg.contentDocument;
|
||||
var rect=createElemNS('rect',{'x':'10','y':'10','width':'50','height':'80','style':'stroke:#000000; fill:none;'});
|
||||
|
||||
document.getElementById("map").appendChild(rect);
|
||||
|
||||
//empty
|
||||
while (document.getElementById('fightResult').firstChild) {
|
||||
document.getElementById('fightResult').removeChild(document.getElementById('fightResult').firstChild);
|
||||
}
|
||||
// draw border;
|
||||
var svg = createElem('svg',{'id':'map','width':'1000','height':'1000'});
|
||||
var rect=createElemNS('rect',{'x':'0','y':'0','width':'1000','height':'1000','style':'stroke:#000000; fill:none;'});
|
||||
svg.appendChild(rect);
|
||||
|
||||
document.getElementById("fightResult").appendChild(svg);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ $bots=get_Bots_Array('tron');
|
|||
</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>
|
||||
<svg id="map" width="1000" height="1000">
|
||||
<div id="fightResult"></div>
|
||||
|
||||
</svg>
|
||||
</article>
|
Loading…
Reference in New Issue
Block a user