Phi: don't display absent DsplThreshold and stopway
This commit is contained in:
parent
872b40828a
commit
d0e2a5469a
2 changed files with 18 additions and 4 deletions
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue