Skip to content

Commit 4f9c34e

Browse files
author
Alan Snow
committed
added event to resize plotly plot on modal show
1 parent 4809f23 commit 4f9c34e

File tree

1 file changed

+7
-0
lines changed
  • tethysapp/streamflow_prediction_tool/public/js

1 file changed

+7
-0
lines changed

tethysapp/streamflow_prediction_tool/public/js/map.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,6 +2230,13 @@ var ERFP_MAP = (function() {
22302230
});
22312231
};
22322232

2233+
//make sure active Plotly plots resize on modal show
2234+
$('#chart_modal').on('shown.bs.modal', function() {
2235+
$('#chart_modal .modal-body .tab-pane.active .js-plotly-plot').each(function(){
2236+
Plotly.Plots.resize($(this)[0]);
2237+
});
2238+
});
2239+
22332240
//init tooltip
22342241
$('.boot_tooltip').tooltip();
22352242

0 commit comments

Comments
 (0)