working on route allocation

This commit is contained in:
Stephan Richter
2020-09-19 13:51:43 +02:00
parent 917ac5dd07
commit 1d1876e1d3
26 changed files with 72114 additions and 39 deletions

View File

@@ -40,7 +40,7 @@ svg rect{
}
svg.locked polygon,
svg.locked rect{
svg.locked rect:not(.sig_a):not(.sig_b){
fill:lime;
}
@@ -160,4 +160,11 @@ h2{
top: 10px;
right: 10px;
display: none;
}
svg.left rect,
svg.right rect,
svg.straight .left,
svg.straight .right{
fill: white !important;
}

View File

@@ -24,7 +24,7 @@ function addTile(x,y){
}
function bodyClick(ev){
console.log('bodyClick:',ev);
//console.log('bodyClick:',ev);
var x = Math.floor(ev.clientX/SQUARE);
var y = Math.floor(ev.clientY/SQUARE);
@@ -42,7 +42,7 @@ function bodyClick(ev){
function clickTile(x,y){
console.log("clickTile:",x,y);
if ($('#tile-'+x+'-'+y).length > 0) request({action:'openProps',x:x,y:y});
if ($('#tile-'+x+'-'+y).length > 0) request({action:'click',x:x,y:y});
return false;
}
@@ -129,8 +129,10 @@ function request(data){
data : data,
success: function(resp){
closeWindows();
if (resp.startsWith('<')){
$('body').append($(resp));
if (resp.startsWith('<svg')){
$('#plan').append($(resp));
} else if (resp.startsWith('<')) {
$(BODY).append($(resp));
} else {
addMessage(resp);
}

View File

@@ -1,4 +1,5 @@
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="0" y="35" width="100" height="30" />
<polygon points="100,65 65,100 35,100 100,35" />
<polygon class="left" points="100,65 65,100 35,100 100,35" />
<polygon points="100,65 65,65 100,35" />
</svg>

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 211 B

View File

@@ -1,4 +1,5 @@
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="35" y="0" width="30" height="100" />
<polygon points="65,0 100,35 100,65 35,0" />
<polygon class="left" points="65,0 100,35 100,65 35,0" />
<polygon points="35,0 65,0 65,35" />
</svg>

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 203 B

View File

@@ -1,4 +1,5 @@
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="35" y="0" width="30" height="100" />
<polygon points="0,35 65,100 35,100 0,65" />
<polygon class="left" points="0,35 65,100 35,100 0,65" />
<polygon points="35,100 65,100 35,65" />
</svg>

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 207 B

View File

@@ -1,4 +1,5 @@
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="0" y="35" width="100" height="30" />
<polygon points="0,35 35,0 65,0 0,65" />
<polygon class="left" points="0,35 35,0 65,0 0,65" />
<polygon points="0,35 35,35 0,65" />
</svg>

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 199 B

View File

@@ -1,4 +1,5 @@
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="0" y="35" width="100" height="30" />
<polygon points="100,65 35,0 65,0 100,35" />
<polygon class="right" points="100,65 35,0 65,0 100,35" />
<polygon points="100,35 100,65 65,35" />
</svg>

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 208 B

View File

@@ -1,4 +1,5 @@
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="35" y="0" width="30" height="100" />
<polygon points="65,0 0,65 0,35 35,0" />
<polygon class="right" points="65,0 0,65 0,35 35,0" />
<polygon points="35,0 65,0 35,35" />
</svg>

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 200 B

View File

@@ -1,4 +1,5 @@
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="35" y="0" width="30" height="100" />
<polygon points="35,100 100,35 100,65 65,100" />
<polygon class="right" points="35,100 100,35 100,65 65,100" />
<polygon points="35,100 65,100 65,65" />
</svg>

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 212 B

View File

@@ -1,4 +1,5 @@
<svg width="100" height="100" viewbox="0 0 100 100">
<rect x="0" y="35" width="100" height="30" />
<polygon points="0,35 65,100 35,100 0,65" />
<polygon class="right" points="0,35 65,100 35,100 0,65" />
<polygon points="0,35 0,65 35,65" />
</svg>

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 204 B