Git Product home page Git Product logo

Comments (2)

octavius37 avatar octavius37 commented on July 17, 2024

Hi, I think there is a problem with the scope of an image cropper. When a new cropper is instantiated, it does so with the defaults. However because the scope isn't isolated, on line 175 of angular-image-cropper.js,
if (this.imageHasToFit()) { this.fitImage(); this.centerImage(); }

this apparently points to both image croppers. So if you have imageHasToFit as true, both images will be zoomed out.

This issue not only affects the defaults. All listeners are bound to this, so if you try rotating after adding another cropper, it will rotate 180 degrees instead of 90.

This is a serious issue for anyone trying to have multiple croppers on the same page. I currently don't have a solution, and I'm not sure my javascript is at the level to implement one, however if I find something I'll let you know. The solution should probably consist of isolating the scope in some way.

from angular-image-cropper.

ericnewton76 avatar ericnewton76 commented on July 17, 2024

I'm running into a scoping problem too. Using this with angular 1.4.9 atm

from angular-image-cropper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.