diff options
author | Jakob Odersky <jodersky@gmail.com> | 2015-03-27 12:48:24 +0100 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2015-03-27 12:48:24 +0100 |
commit | bd174539d8bb2921bef94cccd994a61e334a3dd7 (patch) | |
tree | fa89d47f97779c16d3a54b62518b8c83fc907d3c /vfd-dashboard/src/main/scala/vfd/dashboard/ui/instruments/Compass.scala | |
parent | f7f157cea1afd3386e46938a110c5a2ed72933fb (diff) | |
parent | c2b0a3de4dca16cb9143acffdcc7a9ad1a730b50 (diff) | |
download | mavigator-concise-dialect.tar.gz mavigator-concise-dialect.tar.bz2 mavigator-concise-dialect.zip |
Merge pull request #12 from jodersky/design/cleanupconcise-dialect
Clean up internal structure of dashboard ui
Diffstat (limited to 'vfd-dashboard/src/main/scala/vfd/dashboard/ui/instruments/Compass.scala')
-rw-r--r-- | vfd-dashboard/src/main/scala/vfd/dashboard/ui/instruments/Compass.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vfd-dashboard/src/main/scala/vfd/dashboard/ui/instruments/Compass.scala b/vfd-dashboard/src/main/scala/vfd/dashboard/ui/instruments/Compass.scala new file mode 100644 index 0000000..e2d79e4 --- /dev/null +++ b/vfd-dashboard/src/main/scala/vfd/dashboard/ui/instruments/Compass.scala @@ -0,0 +1,18 @@ +package vfd.dashboard.ui.instruments + +import org.scalajs.dom.html +import vfd.dashboard.Environment + +class Compass(implicit env: Environment) extends SvgInstrument[Double] { + import SvgInstrument._ + + val initial = 0.0 + + lazy val element = svgObject("compass") + lazy val plate = part("heading") + lazy val moveable = Seq(plate) + + protected def update(heading: Double) = { + rotate(plate, heading.toInt) + } +}
\ No newline at end of file |