1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Get context with jQuery

This commit is contained in:
cTn 2013-09-27 17:27:41 +02:00
parent 0e36882b7c
commit d11ff74156
2 changed files with 4 additions and 4 deletions

View file

@ -61,7 +61,7 @@ function tab_initialize_receiver() {
var mid = parseFloat($('.tunings .throttle input[name="mid"]').val());
var expo = parseFloat($('.tunings .throttle input[name="expo"]').val());
var throttle_curve = document.getElementById("throttle_curve_c");
var throttle_curve = $('.throttle_curve canvas').get(0);
var context = throttle_curve.getContext("2d");
context.clearRect(0, 0, 220, 58);
@ -88,7 +88,7 @@ function tab_initialize_receiver() {
var rate = parseFloat($('.tunings .rate input[name="rate"]').val());
var expo = parseFloat($('.tunings .rate input[name="expo"]').val());
var pitch_roll_curve = document.getElementById("pitch_roll_curve_c");
var pitch_roll_curve = $('.pitch_roll_curve canvas').get(0);
var context = pitch_roll_curve.getContext("2d");
context.clearRect(0, 0, 220, 58);