diff options
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.scala | 25 |
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()) - } - } - -} |