mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-22 07:45:29 +03:00
small optimization for RX plot scaling
This commit is contained in:
parent
9914f745a1
commit
244b6d923f
1 changed files with 3 additions and 2 deletions
|
@ -158,11 +158,12 @@ function tab_initialize_receiver() {
|
||||||
var samples = 0;
|
var samples = 0;
|
||||||
var svg = d3.select("svg");
|
var svg = d3.select("svg");
|
||||||
|
|
||||||
|
var RX_plot_e = $('#RX_plot');
|
||||||
var width, height, widthScale, heightScale;
|
var width, height, widthScale, heightScale;
|
||||||
function update_receiver_plot_size() {
|
function update_receiver_plot_size() {
|
||||||
var margin = {top: 20, right: 20, bottom: 10, left: 40};
|
var margin = {top: 20, right: 20, bottom: 10, left: 40};
|
||||||
width = $('#RX_plot').width() - margin.left - margin.right;
|
width = RX_plot_e.width() - margin.left - margin.right;
|
||||||
height = $('#RX_plot').height() - margin.top - margin.bottom;
|
height = RX_plot_e.height() - margin.top - margin.bottom;
|
||||||
|
|
||||||
widthScale.range([0, width]);
|
widthScale.range([0, width]);
|
||||||
heightScale.range([height, 0]);
|
heightScale.range([height, 0]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue