Skip to content

Commit

Permalink
Merge pull request #526 from openworm/development
Browse files Browse the repository at this point in the history
Release Patch
  • Loading branch information
tarelli authored Dec 22, 2016
2 parents de9d987 + d09c0c2 commit 98b7beb
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/main/webapp/js/widgets/plot/Plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,18 +377,19 @@ define(function (require) {

resize : function(resizeHeight){
//sets the width and height on the plotOptions which is given to plotly on relayout

//for some reason, height is different when first plotted, 10 pixels makes the change
if(resizeHeight){
this.plotOptions.height = this.plotElement.height() + 10;
this.plotOptions.width = this.plotElement.width()+ 10;
}else{
this.plotOptions.height = this.plotElement.height();
this.plotOptions.width = this.plotElement.width();
if(this.datasets.length>0){
//for some reason, height is different when first plotted, 10 pixels makes the change
if(resizeHeight){
this.plotOptions.height = this.plotElement.height() + 10;
this.plotOptions.width = this.plotElement.width()+ 10;
}else{
this.plotOptions.height = this.plotElement.height();
this.plotOptions.width = this.plotElement.width();
}
//resizes plot right after creation, needed for d3 to resize
//to parent's widht and height
Plotly.relayout(this.plotDiv,this.plotOptions);
}
//resizes plot right after creation, needed for d3 to resize
//to parent's widht and height
Plotly.relayout(this.plotDiv,this.plotOptions);
},

showImageMenu: function (event) {
Expand Down

0 comments on commit 98b7beb

Please sign in to comment.