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>
|
class="metric">m</span></td>
|
||||||
<td><span data-bind="text: widthFt"></span>ft <span data-bind="text: widthM" class="metric"></span><span
|
<td><span data-bind="text: widthFt"></span>ft <span data-bind="text: widthM" class="metric"></span><span
|
||||||
class="metric">m</span></td>
|
class="metric">m</span></td>
|
||||||
<td><span data-bind="text: displacedThresholdFt"></span>ft <span data-bind="text: displacedThresholdM"
|
<td>
|
||||||
class="metric"></span><span class="metric">m</span></td>
|
<span data-bind="visible: hasDisplacedThreshold">
|
||||||
<td><span data-bind="text: stopwayFt"></span>ft <span data-bind="text: stopwayM" class="metric"></span><span
|
<span data-bind="text: displacedThresholdFt"></span>ft <span data-bind="text: displacedThresholdM"
|
||||||
class="metric">m</span></td>
|
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
|
<td><button
|
||||||
data-bind="button: { text: false, icons: { primary: 'ui-icon-arrowreturnthick-1-e' } }, click: $parent.gotoRwy">Restart
|
data-bind="button: { text: false, icons: { primary: 'ui-icon-arrowreturnthick-1-e' } }, click: $parent.gotoRwy">Restart
|
||||||
here</button></td>
|
here</button></td>
|
||||||
|
|
|
@ -49,11 +49,17 @@ define([
|
||||||
self.displacedThresholdFt = ko.pureComputed(function(){
|
self.displacedThresholdFt = ko.pureComputed(function(){
|
||||||
return (self.displacedThresholdM()/0.3048).toFixed(0);
|
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.stopwayM = ko.observable(Number(rwy.stopway_m||0).toFixed(0));
|
||||||
self.stopwayFt = ko.pureComputed(function(){
|
self.stopwayFt = ko.pureComputed(function(){
|
||||||
return (self.stopwayM()/0.3048).toFixed(0);
|
return (self.stopwayM()/0.3048).toFixed(0);
|
||||||
});
|
});
|
||||||
|
self.hasStopway = ko.pureComputed(function() {
|
||||||
|
return self.stopwayM() > 0;
|
||||||
|
});
|
||||||
|
|
||||||
self.surface = ko.observable(rwy.surface);
|
self.surface = ko.observable(rwy.surface);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue