This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Right Scrollbutton does not work correctly when using Zoom #168
Labels
Comments
felvhage
added a commit
to felvhage/paper-tabs
that referenced
this issue
Jun 1, 2016
This fixes PolymerElements#168. When using Browser-Zoom scrollLeft can be a decimal number. Using Math.ceil on scrollLeft will ensure that the condition will be met in this case and the rightHidden will be set properly.
felvhage
added a commit
to felvhage/paper-tabs
that referenced
this issue
Jun 1, 2016
This fixes PolymerElements#168. When using Browser-Zoom scrollLeft can be a decimal number. Using Math.ceil on scrollLeft will ensure that the condition will be met in this case and the rightHidden will be set properly.
Made the pull-request twice. Its the same fix. I'm new to this. It has no test because i unsure how to simulate Browser-Zoom. |
Found out how to simulate "zoom" in Chrome. Tests added. This should be it. |
Well, not just yet. Shadow-Dom-Tests failing. |
Tests fixed. Stuck on a build-error concerning Firefox: Tests work fine in Firefox locally. Clue anyone? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
The 'paper-tabs' element with attribute 'scrollable' uses Scrollbuttons left and right to allow scrolling through the contained tabs. When it is not possible to scroll further to left or right, the respective scrollbutton gets faded out. However, when using Browser-Zoom, the right scrollbutton does not get faded out.
This problem occurs because the arithmetics in the method '_affectScroll' does not take (zoom induced) rounding errors into account.
current impl:
this._rightHidden = scrollLeft === this._tabContainerScrollSize;
better impl:
this._rightHidden = Math.ceil(scrollLeft) >= this._tabContainerScrollSize;
Expected outcome
Right scrollbutton should get faded out.
Actual outcome
Right scrollbutton stays visible.
Live Demo
https://jsbin.com/zofuwuj/edit?html,output
Steps to reproduce
Browsers Affected
The text was updated successfully, but these errors were encountered: