1
0
Fork 0

Phi: don't display absent DsplThreshold and stopway

This commit is contained in:
Torsten Dreyer 2015-03-30 21:23:32 +02:00
parent 872b40828a
commit d0e2a5469a
2 changed files with 18 additions and 4 deletions

View file

@ -84,10 +84,18 @@
class="metric">m</span></td>
<td><span data-bind="text: widthFt"></span>ft <span data-bind="text: widthM" class="metric"></span><span
class="metric">m</span></td>
<td><span data-bind="text: displacedThresholdFt"></span>ft <span data-bind="text: displacedThresholdM"
class="metric"></span><span class="metric">m</span></td>
<td><span data-bind="text: stopwayFt"></span>ft <span data-bind="text: stopwayM" class="metric"></span><span
class="metric">m</span></td>
<td>
<span data-bind="visible: hasDisplacedThreshold">
<span data-bind="text: displacedThresholdFt"></span>ft <span data-bind="text: displacedThresholdM"
class="metric"></span><span class="metric">m</span>
</span>
</td>
<td>
<span data-bind="visible: hasStopway">
<span data-bind="text: stopwayFt"></span>ft <span data-bind="text: stopwayM" class="metric"></span><span
class="metric">m</span>
</span>
</td>
<td><button
data-bind="button: { text: false, icons: { primary: 'ui-icon-arrowreturnthick-1-e' } }, click: $parent.gotoRwy">Restart
here</button></td>

View file

@ -49,11 +49,17 @@ define([
self.displacedThresholdFt = ko.pureComputed(function(){
return (self.displacedThresholdM()/0.3048).toFixed(0);
});
self.hasDisplacedThreshold = ko.pureComputed(function() {
return self.displacedThresholdM() > 0;
});
self.stopwayM = ko.observable(Number(rwy.stopway_m||0).toFixed(0));
self.stopwayFt = ko.pureComputed(function(){
return (self.stopwayM()/0.3048).toFixed(0);
});
self.hasStopway = ko.pureComputed(function() {
return self.stopwayM() > 0;
});
self.surface = ko.observable(rwy.surface);