Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xw - fix the bug that the right shadow sometimes displays when it shouldn't have #108

Merged

Conversation

weixing2014
Copy link
Contributor

@weixing2014 weixing2014 commented Jan 17, 2017

Description

In some cases, the right shadow of the report displays even if no more content to the right of the last column on the screen.

Turns out the bug is due to the way we treated totalWidth in this line of the PR #58

Under some certain circumstances, re-assigning column widths based on current window width for example, the totalWidth could be a decimal like 180.001, and it will lead the component FixedDataTableRow rendering the right shadow all the time.

To take care of such cases, we need to convert totalWidth to an Integer by Math.floor(totalWidth) in order to make sure the right column shadow won't display when it shouldn't.

Motivation and Context

To show a column shadow when it shouldn't have could be misleading. It makes people think there are more data to the right of the last column on the screen, even though that's not true at all.

How Has This Been Tested?

It's a very minor changes and I tested it manually on a number of browsers.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@KamranAsif KamranAsif merged commit b4713bb into schrodinger:master Jan 17, 2017
@KamranAsif
Copy link
Contributor

LGTM, thanks. I'll publish as part of the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants