Skip to content

Commit 95756cc

Browse files
camdecosteremilykl
andauthored
Simplify boolean logic even more
Co-authored-by: Emily KL <[email protected]>
1 parent dbe140d commit 95756cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/legend/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ function computeLegendDimensions(gd, groups, traces, legendObj) {
771771

772772
const { orientation, yref } = legendObj;
773773
let { maxheight } = legendObj;
774-
const useFullLayoutHeight = isBelowPlotArea || isAbovePlotArea || !(orientation === "v" && yref === "paper")
774+
const useFullLayoutHeight = isBelowPlotArea || isAbovePlotArea || orientation !== "v" || yref !== "paper"
775775
// Set default maxheight here since it depends on values passed in by user
776776
maxheight ||= useFullLayoutHeight ? 0.5 : 1;
777777
const heightToBeScaled = useFullLayoutHeight ? fullLayout.height : gs.h;

0 commit comments

Comments
 (0)