vue-draggable-resizable
vue-draggable-resizable copied to clipboard
Can the w props support 'auto'?
type check failed for prop "w". Expected Number with value NaN, got String with value "auto"
currently on a project and using this magnificently coded package. If I did have time, I would fork and fix this. I would appreciate if there are any contributors here (from the 311 forks) who can provide a fix for this in the next couple of days.
And again, if not - I will, right after current project. Such a small fix with a big impact.
@ereztdev Actually I'm working on it as well and it's pretty much done, I just need to test it a little bit more. I can't provide any deadline, even though the current COVID situation forces us to stay home, but I hope to release it soon.
auto
is supported in the new version 2.2.0. I'm leaving this issue open for any feedback.
Thanks
Hi. I'm using 2.2.0 (and I never used it before) and I see the following:
-
When using w/h="auto" I initially get a square box and when activated it resizes to something close to the parent size (but it's not the same!).
-
When using w/h="100%" the initial size is perfect (exactly the parent) but it gives console errors ([Vue warn]: Invalid prop: custom validator check failed for prop "w") and I can't resize.
So my question: is there a way to initially use the parent size or do I need to retrieve that myself and use that explicitly for the w/h props?
I second @josvos. It seems that the box works smoothly only by using an unsupported value.
Thanks for this feature in 2.2.0, it solved one of my issues I had before. Though to me it seems there is still either a bug or I missunderstand something. I set w and h to auto, but also have min-width and min-height, but the latter get ignored when using auto for the former. I would expect the inline CSS to just apply these as well.