-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
[BUG] calcFitHeight calculates wrong value #192
Comments
Do you think there is any workaround till its fixed? When I see it correctly, its caused by an interal variable that holds the previous value and is added as 'diff'. So currently I dont see a possible workaround, but maybe you have an idea. |
@AE1NS ill check it in few day, thank you for issue |
@AE1NS Please check version from master branch. If that's fixed i gonna push the tag version up. |
Just tested it. Looks good, thank you! |
Unfortunately there is another issue now. When you change the content height to more than 100% of the pane and change it back, the calculated height is wrong (in the example it just moves out of the window at the bottom). Here is an example: |
@AE1NS big thank you for your support. Should be fixed and pushed |
Unfortunately there seems still to be issues with calcFitHeight. Could you have a look to this example: At the end, the container does not have the correct height, its larger. |
@AE1NS Thank you for report. Does it happens after recent tag release |
I dont know exactly. We used 1.3.21 and I had problems with wrong pane heights. I had situations, where the pane sometimes had a wrong height and calcFitHeight didnt solve it. Thats why I upgraded to latest and created the jsfiddle based on it. But I dont know if its the same cause of the problem. |
@AE1NS Ok I'll re-check. |
I just see thats its even more problematic on 1.3.31 than on 1.3.21. With 1.3.31 I have more cases where the pane is not calculated correctly. In my case the pane gets not shrinked and stays at the full previous height. |
@AE1NS |
Thanks for the update! Could you have a look at my jsfiddle example again. Its technically working now, but shouldnt be the pane still be 100% height when the animation starts (as it worked before)? Now the container 'jumps' small to 100px and animates down afterwards. Thats the same effect as in the previous version, when I just removed the 'height' property and called calcFitHeight and looks really strange as I also noted in my last comment (with the bottom shadow). |
@AE1NS You are absolutely right. I will improve transitions to be a smooth. |
@AE1NS Please check. |
There are still problems, the button is pushed out at the bottom here: The height should also be handled correctly, when the rule |
@AE1NS Checked all your cases, reviewed algorithm and seems like works now for all. |
There seems to be another strange behavior: https://jsfiddle.net/8dy0wjt2/ |
In my use case in my app, I also have two steps/times I call calcFitHeight, when the content has the same size. I just see that the pane element sets a 'height' css value and doesnt remove it. In the other cases when the height changes, it always gets removed automatically. |
@AE1NS Thank you again. Fixed also. If you wish, you can make a pull request for some more bugs you find in future. |
Looks good for the moment :) I really appreciate your work and this awesome support! Thank you very much! |
I'm using latest version, 1.3.51, and I just can't call this function. It says '.calcFitHeight is not a function'. |
@luckashenri please create new issue and show your code. I just checked and it works on my side. |
Describe the bug
When using the fitHeight option, changing the drawer content from 200px to 100px and call calcFitHeight(), the content grows instead of shrinking.
To Reproduce
https://jsfiddle.net/jwe3r4uy/
Expected behavior
When changing the content from 200px to 100px, the drawer should shrink.
The text was updated successfully, but these errors were encountered: