vue-draggable-resizable icon indicating copy to clipboard operation
vue-draggable-resizable copied to clipboard

Can the w props support 'auto'?

Open luoxue-victor opened this issue 4 years ago • 6 comments

image

type check failed for prop "w". Expected Number with value NaN, got String with value "auto"

luoxue-victor avatar Mar 20 '20 08:03 luoxue-victor

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 avatar Apr 25 '20 09:04 ereztdev

@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.

mauricius avatar Apr 25 '20 17:04 mauricius

auto is supported in the new version 2.2.0. I'm leaving this issue open for any feedback.

Thanks

mauricius avatar May 03 '20 10:05 mauricius

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?

josvos avatar May 12 '20 10:05 josvos

I second @josvos. It seems that the box works smoothly only by using an unsupported value.

mario-donnarumma avatar Jul 14 '20 12:07 mario-donnarumma

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.

onyx-blackbird avatar Jul 17 '20 13:07 onyx-blackbird