altered style of disabled tiles
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.srsoftware</groupId>
|
<groupId>de.srsoftware</groupId>
|
||||||
<artifactId>web4rail</artifactId>
|
<artifactId>web4rail</artifactId>
|
||||||
<version>0.9.16</version>
|
<version>0.9.17</version>
|
||||||
<name>Web4Rail</name>
|
<name>Web4Rail</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description>Java Model Railway Control</description>
|
<description>Java Model Railway Control</description>
|
||||||
|
|||||||
@@ -227,3 +227,12 @@ h4,ul{
|
|||||||
.menu div.emergency{
|
.menu div.emergency{
|
||||||
background: #ffb561;
|
background: #ffb561;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
svg.disabled circle,
|
||||||
|
svg.disabled line,
|
||||||
|
svg.disabled polygon,
|
||||||
|
svg.disabled rect{
|
||||||
|
fill: #ddddef;
|
||||||
|
stroke-width:5;
|
||||||
|
stroke: red;
|
||||||
|
}
|
||||||
@@ -159,7 +159,7 @@ function request(data){
|
|||||||
if (data.realm != 'car' && data.realm != 'loco') closeWindows();
|
if (data.realm != 'car' && data.realm != 'loco') closeWindows();
|
||||||
if (resp.startsWith('<html')) return;
|
if (resp.startsWith('<html')) return;
|
||||||
if (resp.startsWith('<svg')){
|
if (resp.startsWith('<svg')){
|
||||||
$(PLAN).append($(resp));
|
place(resp);
|
||||||
} else if (resp.startsWith('<')) {
|
} else if (resp.startsWith('<')) {
|
||||||
var isWindow = $(resp).attr('class') == 'window';
|
var isWindow = $(resp).attr('class') == 'window';
|
||||||
if (isWindow) $('.window').remove();
|
if (isWindow) $('.window').remove();
|
||||||
@@ -186,10 +186,7 @@ function runAction(ev){
|
|||||||
function stream(ev){
|
function stream(ev){
|
||||||
var data = ev.data;
|
var data = ev.data;
|
||||||
console.log("received: ",data);
|
console.log("received: ",data);
|
||||||
if (data.startsWith('<svg')) {
|
if (data.startsWith('<svg')) return place(data);
|
||||||
$(PLAN).append($(data));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (data.startsWith("heartbeat")) return heartbeat(data);
|
if (data.startsWith("heartbeat")) return heartbeat(data);
|
||||||
if (data.startsWith("place ")) return place(data.substring(6));
|
if (data.startsWith("place ")) return place(data.substring(6));
|
||||||
if (data.startsWith("remove")) return remove(data.substring(7));
|
if (data.startsWith("remove")) return remove(data.substring(7));
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ public abstract class Tile implements Constants{
|
|||||||
classes.add(getClass().getSimpleName());
|
classes.add(getClass().getSimpleName());
|
||||||
if (route != null) classes.add(LOCKED);
|
if (route != null) classes.add(LOCKED);
|
||||||
if (train != null) classes.add(OCCUPIED);
|
if (train != null) classes.add(OCCUPIED);
|
||||||
|
if (disabled) classes.add(DISABLED);
|
||||||
return classes;
|
return classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -378,6 +379,7 @@ public abstract class Tile implements Constants{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
disabled = "on".equals(params.get(DISABLED));
|
disabled = "on".equals(params.get(DISABLED));
|
||||||
|
plan.stream(tag(null).toString());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user