advanced-cropper / vue-advanced-cropper

The advanced vue cropper library that gives you opportunity to create your own croppers suited for any website design
https://advanced-cropper.github.io/vue-advanced-cropper/
Other
991 stars 135 forks source link

One of the worst documentation ever! Incomplete examples and bad explanation! Thanks! #84

Closed enoh-barbu closed 3 years ago

enoh-barbu commented 3 years ago
Norserium commented 3 years ago

Hello, @enoh-barbu!

Welcome to the open source. This documentation is written by me. I don't receive any financial support and do it on my own, so I don't have enough time to make it perfect. Moreover, it's the beta version and this library is still in the development as well as its documentation.

So instead of unconstructive criticism, I suggest you to write an specific comments, what should be improved. It would be very helpful for our community.

enoh-barbu commented 3 years ago

I got crazy last night trying to make it working, spent about 3 hours on that, still no results. I understand your statements and agree with them, but in my opinion, this should not go live if the job is half done. I won't put more details. Just wanted to release my stress out here.

Norserium commented 3 years ago

@enoh-barbu there are two kinds of people in the world: who knows how to do things right and who do things. In any case, it's impossible to make the documentation that will be clear for all users without its beta testing. To facilitate their lives I don't mind if users asks their questions in the issues section in this situation, I try to reply them quickly enough.

I won't put more details.

Why? Just describe your problem in a nutshell. I will be glad to help you.

enoh-barbu commented 3 years ago

PreviewResult is nowhere documented. In code examples seems to accept an image which should be an object?? with what properties? How the image can be passed to that? This is just an example, but again, I won't put more work on your belt as I understand you're doing it in your spare time.

Norserium commented 3 years ago

@enoh-barbu, first of all, PreviewResult is the service component used to display the image in the stencil component. The img is object, indeed, and it's passed to this component by cropper itself.

Did you want to create the custom stencil? I have feeling that you wanted just output the preview of cropped image just like there: image

This is just an example, but again, I won't put more work on your belt as I understand you're doing it in your spare time.

Now I know, that I have problem and it's disturbing me, so I'm ready to spend additional time to solve it.

Norserium commented 3 years ago

I suppose that this fragment of the documentation misled you: screenshot

It's pretty rare situation when it will be needed you (only for custom stencil),

enoh-barbu commented 3 years ago

I just tried to copy paste the last code example from here I've created a component for that. I need to pass my image. I get this Invalid prop: type check failed for prop "img". Expected Object, got String with value "blob

enoh-barbu commented 3 years ago

Oh, so PreviewResult is that image on the right side, you've showed above....great! I just now barely understood what it does!

Norserium commented 3 years ago

Oh, so PreviewResult is that image on the right side, you've showed above....great! I just now barely understood what it does!

No, no. PreviewResult is the service component, that is used in the stencil internally to display the cropped area.

I've created a component for that. I need to pass my image. I get this Invalid prop: type check failed for prop "img". Expected Object, got String with value "blob

You cannot pass your image to this stencil directly, it's the stencil, not cropper. I suppose you should need take a look at the full example.

The stencil code is in Stencil.vue, the cropper code is in App.vue.

Norserium commented 3 years ago

Anyway, what did you want to get exactly? The cropper with this specific circle?

enoh-barbu commented 3 years ago

I thought the code above is to have this result image

enoh-barbu commented 3 years ago

at the full example. now this makes sense

Norserium commented 3 years ago

I thought the code above is to have this result

Now I understand that it's not obvious. I will try to make it more clear to users and provide the link to that codesandbox (I suppose, that similar codesandboxes will be useful for other examples too).

Thanks.

enoh-barbu commented 3 years ago

that will make it easier! thanks! sorry for the hard words

Norserium commented 3 years ago

All's well that ends well. I hope that my library helped you to solve your task.

yogsky commented 3 years ago

at the full example. now this makes sense

I believe this example now include a bug where if you try first to resize the stencil (not drag it), stencil is stuck and cannot move afterwards.

Norserium commented 3 years ago

@yogsky, thank you! It's fixed now.

yogsky commented 3 years ago

@Norserium 🥇 First off, thanks a lot (also for the awesome package). May I ask what was the needed change that you made 🤓 ?

Norserium commented 3 years ago

@yogsky, my pleasure.

In the previous versions ResizeEvent received three arguments, include the native event. I decide, that the first argument (i.e. event) is redundant, because I can't rely on event, that user passes, so it was removed in the new versions.

To fix this problem I just removed the passing of the native event as the first argument of ResizeEvent constructor (line 50).

yogsky commented 3 years ago

@Norserium, got it, Thank you! ❤️

Elvincth commented 3 years ago

Would be nice to add a search bar to the documantaion!