jofftiquez / vue-croppie

Vue wrapper for croppie
https://jofftiquez.github.io/vue-croppie/
MIT License
260 stars 42 forks source link

Sample code does not work properly #51

Closed ryanhovland closed 5 years ago

ryanhovland commented 5 years ago

I just tried firing up an instance of vue-croppie with your sample code, but no preview image appears above the slider. I think .croppie-container needs an explicit height set. I'm not sure if I'm doing something wrong, but I added the code below and then saw it properly.

.croppie-container {
   height: 300px;
   width: 300px;
}

p.s. Thanks for your work on this package!

jofftiquez commented 5 years ago

Hi @ryanhovland you can actually pass a props called customClass. You can define the container's height and width using this. Also, can you try passing this property :viewport="{ width: 300, height: 300 }"? Maybe it's what you're looking for. Thanks!

ryanhovland commented 5 years ago

@jofftiquez Passing :viewport doesn't fix it. I had to manually define a height (like my code sample above). The customClass might work too (didn't try that yet). Either way, just wanted to mention that your sample code isn't working properly as-is. You might want to update it so people don't think the package is broken.

Thanks again for your work on this. Have a great day!

jofftiquez commented 5 years ago

@ryanhovland great! Thank you for notifying me. :) Have a great day too!