blob: c6f7d45f8f4256ec452c5b2b4dcdbdc60657e8b7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package mavigator.dashboard.ui.instruments
import rx._
import scalatags.JsDom.all._
import mavigator.util.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)
}
}
|