This commit is contained in:
Stephan Richter
2020-12-09 23:19:30 +01:00
parent d02f66ddff
commit da7fd17f21
11 changed files with 79 additions and 44 deletions

View File

@@ -33,16 +33,15 @@ public class CrossH extends Cross{
public Map<Connector,State> offsetConnections(Direction from) {
if (isNull(from)) return new HashMap<>();
switch (from) {
case NORTH:
return Map.of(new Connector(x,y+1,Direction.NORTH),State.UNDEF);
case SOUTH:
return Map.of(new Connector(x,y-1,Direction.SOUTH),State.UNDEF);
default:
return new HashMap<>();
case NORTH:
return Map.of(new Connector(x,y+1,Direction.NORTH),State.UNDEF);
case SOUTH:
return Map.of(new Connector(x,y-1,Direction.SOUTH),State.UNDEF);
default:
return new HashMap<>();
}
}
}
@Override
public Tag tag(Map<String,Object> replacements) throws IOException {
return super.tag(replacements).size(200,100).attr("viewbox", "0 0 200 100");