-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feature:Maintain Widget Aspect Ratio #530
Comments
change gridster constructor to accept a new parameter 'maintain_aspect_ratio:boolean' that defaults to false and modify method 'on_resize' to force aspect ratio if feature is enabled Closes ducksboard#530
I want to have the same feature of maintaining the Aspect ratio ? How could I do that? Has this feature got merged into the original code base ? |
Hey jeevakannan-u! I don't think the original maintainer of the project is keeping it up to date, but you can pull my branch with the fix here: |
Just a note on the link above: |
Or, if you just want the distributable version of the library (with both fixes), you can just grab this single file here: https://github.com/mdconaway/vchat/blob/master/vchat/vendor/lib/gridster.js |
For the purpose of my project here:
https://github.com/mdconaway/vchat
I needed a dynamic option to force all gridster widgets to maintain their initial aspect ratios while also being resizeable.
I have added this feature into the code base, and by default it does not alter any behavior within gridster. To enable forced aspect ratios, a user can now simply pass in the parameter: 'maintain_aspect_ratio:boolean' as a part of the 'options' object that is sent to a gridster constructor. The aspect ratio logic uses a greatest change differential comparison to adjust the overall widget dimensions based on whether a user has made larger overall adjustments vertically or laterally.
I will create a pull request to close this feature request
The text was updated successfully, but these errors were encountered: