Merge pull request #27 from mikeller/curve_height_adjustment

Adjusted curve height on PID tab.
10.3.x-maintenance
borisbstyle 2016-06-20 22:00:59 +02:00 committed by GitHub
commit a4cdf75e32
2 changed files with 3 additions and 10 deletions

View File

@ -186,7 +186,7 @@
<td>
<div class="spacer" style="margin-top: 10px; margin-bottom: 10px;">
<div class="pitch_roll_curve">
<canvas style="width: 100%; height: 100%"></canvas>
<canvas height="120px" style="width: 100%; height: 100%"></canvas>
</div>
</div>
</td>
@ -206,7 +206,7 @@
<td>
<div class="spacer" style="margin-top: 10px; margin-bottom: 10px;">
<div class="yaw_curve">
<canvas style="width: 100%; height: 100%"></canvas>
<canvas height="120px" style="width: 100%; height: 100%"></canvas>
</div>
</div>
</td>
@ -243,4 +243,4 @@
<a class="refresh" href="#" i18n="pidTuningButtonRefresh"></a>
</div>
</div>
</div>
</div>

View File

@ -352,13 +352,6 @@ TABS.pid_tuning.initialize = function (callback) {
$('.pid_tuning .roll_pitch_rate').hide();
}
function setCanvasDimensions(canvas) {
canvas.width = canvas.parentNode.clientWidth;
canvas.height = canvas.parentNode.clientHeight;
}
setCanvasDimensions($('.pitch_roll_curve canvas').get(0));
setCanvasDimensions($('.yaw_curve canvas').get(0));
function drawRateCurve(rateElement, expoElement, canvasElement) {
var rate = parseFloat(rateElement.val()),
expo = parseFloat(expoElement.val()),