From d11ff7415675ffe40586723c1a16a49ffc3cb90a Mon Sep 17 00:00:00 2001 From: cTn Date: Fri, 27 Sep 2013 17:27:41 +0200 Subject: [PATCH] Get context with jQuery --- tabs/receiver.html | 4 ++-- tabs/receiver.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tabs/receiver.html b/tabs/receiver.html index dac8cb61ee..e95838094b 100644 --- a/tabs/receiver.html +++ b/tabs/receiver.html @@ -65,10 +65,10 @@ Save
- +
- +
diff --git a/tabs/receiver.js b/tabs/receiver.js index 06c6d80a77..261e620e25 100644 --- a/tabs/receiver.js +++ b/tabs/receiver.js @@ -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);