-
Notifications
You must be signed in to change notification settings - Fork 11
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
Clamping of consecutive elements with a common parent is broken #2
Comments
I managed to create a minimal example, where the second of two subsequent elements is not clamped correctly. As this error only occurs when using drainPhaseQueue = (phase) ->
jobs = jobQueues[phase]
if jobs.length > 0
- while job = jobs.shift()
+ while job = jobs.pop()
job() Sadly, this does not fix the issue. Any other ideas? |
One more hint: Disabling value-caching fixes the problem, but is not an option: - instance = element[INSTANCE_KEY] || new Superclamp(element)
+ instance = new Superclamp(element) |
This commit also introduces a CHANGELOG.
…-height` caused subsequent elements to be clamped incorrectly. Resolves #2
…-height` caused subsequent elements to be clamped incorrectly. Resolves #2
…-height` caused subsequent elements to be clamped incorrectly. Resolves #2
Fixed in 0.2.3 |
Consider this markup:
In this situation, Superclamp will not always clamp the
.second
element properly, i.e. its contents will exceed its height and bleed out of.second
. Unfortunately, this behavior is not deterministic, meaning it will sometimes clamp right and sometims do it wrong.When investigating a broken
.second
, I found that Superclamp had stored incorrectelementAt
values for the element.I assume this originates from the fact that Superclamp splits "measurement" and "adaption" in two consecutive phases. This breaks when the measures for
.second
are changed during the adaption of.first
.The text was updated successfully, but these errors were encountered: