1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

bugfixes for last merge

This commit is contained in:
cTn 2014-04-21 11:59:02 +02:00
parent c1fc82e0e4
commit 3421916c21
2 changed files with 9 additions and 7 deletions

View file

@ -213,11 +213,12 @@ function tab_initialize_receiver() {
var heightScale = d3.scale.linear().
domain([800, 2200]);
var margin, width, height;
function update_receiver_plot_size() {
var margin = {top: 20, right: 20, bottom: 10, left: 40};
var width = $('#RX_plot').width() - margin.left - margin.right;
var height = $('#RX_plot').height() - margin.top - margin.bottom;
widthSclae.range([0, width]);
margin = {top: 20, right: 20, bottom: 10, left: 40};
width = $('#RX_plot').width() - margin.left - margin.right;
height = $('#RX_plot').height() - margin.top - margin.bottom;
widthScale.range([0, width]);
heightScale.range([height, 0]);
}

View file

@ -40,10 +40,11 @@ function tab_initialize_sensors() {
return sampleNumber + 1;
}
var margin, width, height;
function updateGraphHelperSize(selector, helpers) {
var margin = {top: 20, right: 20, bottom: 10, left: 40};
var width = $(selector).width() - margin.left - margin.right;
var height = $(selector).height() - margin.top - margin.bottom;
margin = {top: 20, right: 20, bottom: 10, left: 40};
width = $(selector).width() - margin.left - margin.right;
height = $(selector).height() - margin.top - margin.bottom;
helpers.widthScale.range([0, width]);
helpers.heightScale.range([height, 0]);