8 changed files with 36 additions and 41 deletions
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 109 B |
@ -1,24 +1,9 @@ |
|||||||
package de.srsoftware.web4rail.tiles; |
package de.srsoftware.web4rail.tiles; |
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
|
|
||||||
import de.srsoftware.tools.Tag; |
|
||||||
|
|
||||||
public class StraightH extends StretchableTile{ |
public class StraightH extends StretchableTile{ |
||||||
|
|
||||||
@Override |
@Override |
||||||
public int len() { |
public int len() { |
||||||
return length; |
return length; |
||||||
} |
} |
||||||
|
|
||||||
@Override |
|
||||||
public Tag tag() throws IOException { |
|
||||||
Tag tag = super.tag(); |
|
||||||
if (length>1) { |
|
||||||
String style = tag.get("style"); |
|
||||||
tag.style(style.trim()+" width: "+(30*length)+"px;"); |
|
||||||
tag.attr("preserveAspectRatio","none"); |
|
||||||
} |
|
||||||
return tag; |
|
||||||
} |
|
||||||
} |
} |
||||||
|
@ -1,25 +1,9 @@ |
|||||||
package de.srsoftware.web4rail.tiles; |
package de.srsoftware.web4rail.tiles; |
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
|
|
||||||
import de.srsoftware.tools.Tag; |
|
||||||
|
|
||||||
public class StraightV extends StretchableTile{ |
public class StraightV extends StretchableTile{ |
||||||
|
|
||||||
@Override |
@Override |
||||||
public int height() { |
public int height() { |
||||||
return length; |
return length; |
||||||
} |
} |
||||||
|
|
||||||
@Override |
|
||||||
public Tag tag() throws IOException { |
|
||||||
Tag tag = super.tag(); |
|
||||||
if (length>1) { |
|
||||||
LOG.debug("{}.tag: length = {}",getClass().getSimpleName(),length); |
|
||||||
String style = tag.get("style"); |
|
||||||
tag.style(style.trim()+" height: "+(30*length)+"px;"); |
|
||||||
tag.attr("preserveAspectRatio","none"); |
|
||||||
} |
|
||||||
return tag; |
|
||||||
} |
|
||||||
} |
} |
||||||
|
Loading…
Reference in new issue