improved stretching of tiles

This commit is contained in:
Stephan Richter
2020-09-14 22:12:43 +02:00
parent 1e1b3f434f
commit 140414837b
8 changed files with 36 additions and 41 deletions

View File

@@ -1,24 +1,9 @@
package de.srsoftware.web4rail.tiles;
import java.io.IOException;
import de.srsoftware.tools.Tag;
public class StraightH extends StretchableTile{
@Override
public int len() {
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;
}
}