working on stretchable tiles

This commit is contained in:
Stephan Richter
2020-09-14 01:41:01 +02:00
parent 44abb92ed5
commit 10837473ce
10 changed files with 146 additions and 11 deletions

View File

@@ -1,4 +1,24 @@
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;
}
}