Skip to content

Commit

Permalink
remove unused display breakpoints state
Browse files Browse the repository at this point in the history
  • Loading branch information
interim17 committed Sep 30, 2024
1 parent 11f7eae commit f8873ef
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/containers/ViewerPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ interface ViewerPanelState {
height: number;
width: number;
movieURL: string;
embedDisplayBreakpoints: {
belowControlsHeight: boolean;
belowControlsWidth: boolean;
belowScaleBarWidth: boolean;
};
}

class ViewerPanel extends React.Component<ViewerPanelProps, ViewerPanelState> {
Expand All @@ -153,11 +148,6 @@ class ViewerPanel extends React.Component<ViewerPanelProps, ViewerPanelState> {
height: 0,
width: 0,
movieURL: "",
embedDisplayBreakpoints: {
belowControlsHeight: false,
belowControlsWidth: false,
belowScaleBarWidth: false,
},
};
}

Expand Down Expand Up @@ -493,7 +483,9 @@ class ViewerPanel extends React.Component<ViewerPanelProps, ViewerPanelState> {
const { height, width } = this.state;
const belowControlsHeight = height <= CONTROLS_MIN_HEIGHT;
const belowControlsWidth = width <= CONTROLS_MIN_WIDTH;
const showScaleBar = width > SCALE_BAR_MIN_WIDTH && (!belowControlsWidth || !belowControlsHeight);
const showScaleBar =
width > SCALE_BAR_MIN_WIDTH &&
(!belowControlsWidth || !belowControlsHeight);

if (belowControlsHeight && belowControlsWidth) {
return {
Expand Down

0 comments on commit f8873ef

Please sign in to comment.