Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support replacing current image on drag and drop #53

Closed
zhanziyang opened this issue Dec 1, 2017 · 6 comments
Closed

Support replacing current image on drag and drop #53

zhanziyang opened this issue Dec 1, 2017 · 6 comments

Comments

@zhanziyang
Copy link
Owner

Initially asked in #51 by @PrimozRome.

@zhanziyang
Copy link
Owner Author

version 1.1.4 comes with a new prop: replace-drop

<croppa replace-drop></croppa>

turning on replace-drop mode will result in current image getting replaced by the new one on drag and drop.

  • type: boolean
  • default: false (By default you need to remove the current image to drop a new one)

@PrimozRome
Copy link

@zhanziyang awesome, thanks for quick feature update.

@PrimozRome
Copy link

@zhanziyang I tried the 1.1.4. and added replace-drop but you have a bug - the drag and drop with new attribute won't work over the initial image like this:

<croppa
    v-model="myCroppa"
    replace-drop>
    <img src="~/assets/img/profiles/1.png" slot="initial">
</croppa>

With a setup like this you need to first remove the initial image and then drag and drop will work. Can you fix this in next release?

@zhanziyang
Copy link
Owner Author

zhanziyang commented Dec 8, 2017 via email

@zhanziyang
Copy link
Owner Author

@PrimozRome I can't reproduce your issue. I made a demo and it works fine here. Take a look. https://codepen.io/zhanziyang/pen/MONOeP

@PrimozRome
Copy link

@zhanziyang thanks. I am not using your CSS and looks like I have problem with my CSS... Thanks for your effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants