zhaoyongjie commented on a change in pull request #13986:
URL: https://github.com/apache/superset/pull/13986#discussion_r620786886
##########
File path:
superset-frontend/src/dashboard/components/gridComponents/ChartHolder.jsx
##########
@@ -245,8 +245,8 @@ class ChartHolder extends React.Component {
let chartHeight = 0;
if (this.state.isFullSize) {
- chartWidth = document.body.clientWidth - CHART_MARGIN;
- chartHeight = document.body.clientHeight - CHART_MARGIN;
+ chartWidth = window.screen.width - CHART_MARGIN;
Review comment:
Hi there, why we use `window.screen.width` instead of
`window.innerWidth`(previous implementation for you). The `window.screen.width`
looks like it always gets the whole screen width instead of the browser width.
Thanks again for your contribution!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]