mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-22 07:45:19 +03:00
Merge pull request #1186 from mikeller/fix_rates_exception
Fixed exception when rates curve not showing.
This commit is contained in:
commit
fd65c6a4f1
1 changed files with 70 additions and 73 deletions
|
@ -1497,15 +1497,12 @@ TABS.pid_tuning.updateRatesLabels = function() {
|
|||
yaw : {color: 'rgba(128,128,255,0.4)', border: 'rgba(128,128,255,0.6)', text: '#000000'}
|
||||
};
|
||||
|
||||
var rcStickElement,
|
||||
stickContext;
|
||||
|
||||
if(!rcStickElement) {
|
||||
rcStickElement = $('.rate_curve canvas#rate_curve_layer1').get(0);
|
||||
var rcStickElement = $('.rate_curve canvas#rate_curve_layer1').get(0);
|
||||
if(rcStickElement) {
|
||||
rcStickElement.width = 1000;
|
||||
rcStickElement.height = 1000;
|
||||
}
|
||||
if(!stickContext) stickContext = rcStickElement.getContext("2d");
|
||||
|
||||
var stickContext = rcStickElement.getContext("2d");
|
||||
|
||||
stickContext.save();
|
||||
|
||||
|
@ -1572,6 +1569,6 @@ TABS.pid_tuning.updateRatesLabels = function() {
|
|||
for(var i=0; i<balloons.length; i++) balloons[i].balloon();
|
||||
|
||||
stickContext.restore();
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue