Skip to content

Commit

Permalink
fix height parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Chen authored and Amy Chen committed Nov 22, 2023
1 parent 4ef586e commit d799b13
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/components/graph/SurveyGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,8 @@ export default class SurveyGraph extends Component {
onClick={(e) => {
let options = this.copyImageOptions;
const containerHeight =
this.graphContainerRef.current.offsetHeight - 64;
options.style = {
height: containerHeight + "px",
};
this.graphContainerRef.current.offsetHeight - 64; // minus the height of the slider
options.height = containerHeight;
downloadDomImage(
e,
this.graphContainerRef.current,
Expand Down Expand Up @@ -467,10 +465,8 @@ export default class SurveyGraph extends Component {
onClick={() => {
let options = this.copyImageOptions;
const containerHeight =
this.graphContainerRef.current.offsetHeight - 64;
options.style = {
height: containerHeight + "px",
};
this.graphContainerRef.current.offsetHeight - 64; // minus the height of the slider
options.height = containerHeight;
copyDomToClipboard(this.graphContainerRef.current, options);
}}
className="print-hidden button-default rounded"
Expand Down

0 comments on commit d799b13

Please sign in to comment.