jsakamoto / Toolbelt.Blazor.SplitContainer

A Blazor component to create panes separated by a slidable splitter bar.
https://jsakamoto.github.io/Toolbelt.Blazor.SplitContainer/
Mozilla Public License 2.0
61 stars 7 forks source link

Add Size Units : % px em vh vw #1

Closed emersion-uday closed 1 month ago

gregsdennis commented 1 year ago

I would very much like to see this feature become part of this project!

jsakamoto commented 1 month ago

Hi @emersion-uday, Unfortunately, your implementation didn't work when users dragged and moved the splitter bar because the UpdateSize method always receives a px unit value in its nextSize argument unless you also improved the client-side script.

Fortunately, I added support for the "%" unit at the v.2.0. Please check it out.

On the other hand, supporting other units like vh, vw, and em must be hard because I don't know how to convert the px unit value to those other units. I must convert them in the client-side script from the px unit value, the user's dragging and moving point, to those units to support those units.

Anyway, thank you for your contributions. I'll close this PR, but I appreciate your contributions.