blob: f5259b5d7e2ef90551fb7bf1ce72afa893b4c961 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package vfd.dashboard.ui.instruments
import rx._
import scalatags.JsDom.all._
import vfd.dashboard.Environment
class Led(val value: Rx[String])(implicit env: Environment) extends SvgInstrument[String] {
lazy val element = `object`(`type` := "image/svg+xml", "data".attr := env.asset("images/leds/led.svg"), width := 100.pct)(
"Error loading led.").render
protected def moveable = Seq()
protected def update(color: String) = {
part("light").setAttribute("fill", color)
}
}
|