blob: 4173f37b6ef9d473d262b697ce0d29a745831076 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package vfd.dashboard.ui.instruments
import scalatags.JsDom.all._
import vfd.dashboard.Environment
class Led(implicit env: Environment) extends SvgInstrument[String] {
val initial = "none"
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)
}
}
|