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

Apparent incompatibility with Ionic #95

Open
viking2917 opened this issue Jul 13, 2017 · 0 comments
Open

Apparent incompatibility with Ionic #95

viking2917 opened this issue Jul 13, 2017 · 0 comments

Comments

@viking2917
Copy link

First, thanks for this awesome component!

Does anyone have experience using this with Ionic? Without altering the code as described below, I am unable to alter the cropping box, as no mouse events seem to propagate to the component.

Steps to reproduce:
Install blank ionic starter app (using Ionic command line tool):
ionic start clipTest blank

add the js library for clipping into index.html
insert the demo code from the home page for angular-img-cropper
(attached HTML file)
add the example controller code to the app.js file (attached)
Archive.zip

dragging on the clip box will not do anything.

angular-img-cropper sets up event watches on various events of the form
mousemove.angular-img-cropper
and so on. If I edit angular-img-cropper.js to change all the event names from .angular-img-cropper to (e.g.
.on('mouseup.angular-img-cropper', this.onMouseUp.bind(this))
becomes
.on('mouseup', this.onMouseUp.bind(this))

it seems to work fine. But I don't know whether that has any unanticipated side effects. My hypothesis is that ionic is somehow taking over event processing and so the event targets aren't as expected.

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

1 participant