aboutsummaryrefslogtreecommitdiff
path: root/mavigator-cockpit/src/main/scala/mavigator/dashboard/ui/instruments/Instrument.scala
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-02-27 17:11:10 -0800
committerJakob Odersky <jakob@odersky.com>2016-04-14 04:03:17 -0700
commitdae336ee5514970fee93b0db25ce272ab83bd3c7 (patch)
treea628a7c02c6956d99510d98f2a0321be00b241bf /mavigator-cockpit/src/main/scala/mavigator/dashboard/ui/instruments/Instrument.scala
parent773bc081728bf770281a22c1700d05b1def75542 (diff)
downloadmavigator-dae336ee5514970fee93b0db25ce272ab83bd3c7.tar.gz
mavigator-dae336ee5514970fee93b0db25ce272ab83bd3c7.tar.bz2
mavigator-dae336ee5514970fee93b0db25ce272ab83bd3c7.zip
Refactor UI to a HUD-style interface
Diffstat (limited to 'mavigator-cockpit/src/main/scala/mavigator/dashboard/ui/instruments/Instrument.scala')
-rw-r--r--mavigator-cockpit/src/main/scala/mavigator/dashboard/ui/instruments/Instrument.scala25
1 files changed, 0 insertions, 25 deletions
diff --git a/mavigator-cockpit/src/main/scala/mavigator/dashboard/ui/instruments/Instrument.scala b/mavigator-cockpit/src/main/scala/mavigator/dashboard/ui/instruments/Instrument.scala
deleted file mode 100644
index 61f240c..0000000
--- a/mavigator-cockpit/src/main/scala/mavigator/dashboard/ui/instruments/Instrument.scala
+++ /dev/null
@@ -1,25 +0,0 @@
-package mavigator.dashboard.ui.instruments
-
-import rx._
-import org.scalajs.dom.html
-
-/** Common trait to all flight instruments. */
-trait Instrument[A] {
-
- /** Current value that is displayed in the instrument. */
- val value: Rx[A]
-
- /** HTML element that contains the rendered instrument */
- val element: html.Element
-
- /** Performs the actual UI update of this instrument. */
- protected def update(newValue: A): Unit
-
- /** Call when instrument has finished setting up its UI. */
- protected def ready() = {
- Obs(value, skipInitial = true) {
- update(value())
- }
- }
-
-}