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 = {};
|
||||
request['query'] = query;
|
||||
request['height'] = $('#result-image').height();
|
||||
request['width'] = $('#result-image').width();
|
||||
request['height'] = Math.floor($('#result-image').height());
|
||||
request['width'] = Math.floor($('#result-image').width());
|
||||
request['groupBy'] = groupBy();
|
||||
request['limitBy'] = data.searchBar.limitBy.selected;
|
||||
request['limit'] = parseInt(data.searchBar.limitBy.number);
|
||||
@@ -767,8 +767,8 @@ function updateImageLink(query) {
|
||||
'plotType': data.searchBar.plotType,
|
||||
'aggregate': data.searchBar.aggregate,
|
||||
'keyOutside': data.searchBar.keyOutside,
|
||||
'width': $('#result-image').width(),
|
||||
'height': $('#result-image').height()
|
||||
'width': Math.floor($('#result-image').width()),
|
||||
'height': Math.floor($('#result-image').height())
|
||||
};
|
||||
|
||||
data.searchBar.imagelink = window.location.origin+ window.location.pathname + "plots?" + jQuery.param(params);
|
||||
|
||||
Reference in New Issue
Block a user