Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Add buttons that scroll source left and right #183

Merged
merged 2 commits into from
May 15, 2017

Conversation

dpgraham
Copy link
Contributor

  • Added component that has a left and right scroll button that takes a container as an argument
  • Clicking left makes the scrollLeft -= 20, click right makes the scrollLeft += 20
  • Doesn't show component if clientWidth > scrollWidth

(reviewer @jlipps)

* Added component that has a left and right scroll button that takes a container as an argument
* Clicking left makes the scrollLeft -= 20, click right makes the scrollLeft += 20
* Doesn't show component if clientWidth > scrollWidth
@dpgraham dpgraham requested a review from jlipps May 12, 2017 00:44
For some reason antd has a max height on the ant-spin of 320 px which was causing the spinner to not be centered
@jlipps
Copy link
Member

jlipps commented May 13, 2017

All looks good to me, however I noticed that if I open the inspector in its default size, and then simply open up the xml document from there, the buttons don't show up. I actually have to trigger a resize event. Can we hook this up to check the state based on other actions in the tree? That way it can remember to check whether we need to show the buttons if we just click on a tree element that happens to expand out wide.

@dpgraham
Copy link
Contributor Author

I made it so that whenever the source is clicked on, it checks again to determine if we should see the scroll buttons or not.

In the case you're talking about, is it actually invisible in spite of the fact that the XML is too large?

@dpgraham dpgraham merged commit 5f373ae into master May 15, 2017
dpgraham added a commit that referenced this pull request May 15, 2017
* Add buttons that scroll source left and right

* Added component that has a left and right scroll button that takes a container as an argument
* Clicking left makes the scrollLeft -= 20, click right makes the scrollLeft += 20
* Doesn't show component if clientWidth > scrollWidth
@dpgraham dpgraham deleted the dpgraham-scrollable-source-pane branch May 15, 2017 23:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants