Skip to content

Commit

Permalink
expand on comment
Browse files Browse the repository at this point in the history
  • Loading branch information
samhinshaw committed Dec 14, 2024
1 parent f821b3a commit 8596cc3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3708,7 +3708,17 @@ function makePlotFramework(gd) {
// The plot container should always take the full with the height of its
// parent (the graph div). This ensures that for responsive plots
// without a height or width set, the paper div will take up the full
// height & width of the graph div.
// height & width of the graph div.
// So, for responsive plots without a height or width set, if the plot
// container's height is left to 'auto', its height will be dictated by
// its childrens' height. (The plot container's only child is the paper
// div.)
// In this scenario, the paper div's height will be set to 100%,
// which will be 100% of the plot container's auto height. That is
// meaninglesss, so the browser will use the paper div's children to set
// the height of the plot container instead. However, the paper div's
// children do not have any height, because they are all positioned
// absolutely, and therefore take up no space.
.style({
width: "100%",
height: "100%"
Expand Down

0 comments on commit 8596cc3

Please sign in to comment.