Chrome uses double for height/width of elements
This caused a NumberFormatExeption when trying to convert the string representation of a double to an int. Fixed by floor'ing the value.
This commit is contained in:
@@ -713,8 +713,8 @@ function sendPlotRequest(query){
|
|||||||
|
|
||||||
var request = {};
|
var request = {};
|
||||||
request['query'] = query;
|
request['query'] = query;
|
||||||
request['height'] = $('#result-image').height();
|
request['height'] = Math.floor($('#result-image').height());
|
||||||
request['width'] = $('#result-image').width();
|
request['width'] = Math.floor($('#result-image').width());
|
||||||
request['groupBy'] = groupBy();
|
request['groupBy'] = groupBy();
|
||||||
request['limitBy'] = data.searchBar.limitBy.selected;
|
request['limitBy'] = data.searchBar.limitBy.selected;
|
||||||
request['limit'] = parseInt(data.searchBar.limitBy.number);
|
request['limit'] = parseInt(data.searchBar.limitBy.number);
|
||||||
@@ -767,8 +767,8 @@ function updateImageLink(query) {
|
|||||||
'plotType': data.searchBar.plotType,
|
'plotType': data.searchBar.plotType,
|
||||||
'aggregate': data.searchBar.aggregate,
|
'aggregate': data.searchBar.aggregate,
|
||||||
'keyOutside': data.searchBar.keyOutside,
|
'keyOutside': data.searchBar.keyOutside,
|
||||||
'width': $('#result-image').width(),
|
'width': Math.floor($('#result-image').width()),
|
||||||
'height': $('#result-image').height()
|
'height': Math.floor($('#result-image').height())
|
||||||
};
|
};
|
||||||
|
|
||||||
data.searchBar.imagelink = window.location.origin+ window.location.pathname + "plots?" + jQuery.param(params);
|
data.searchBar.imagelink = window.location.origin+ window.location.pathname + "plots?" + jQuery.param(params);
|
||||||
|
|||||||
Reference in New Issue
Block a user