Comments (3)
A good practice is to $emit
events on $rootScope
. There is no $emit
ting in ngCropper yet.
The scenario to think about is when there are several croppers on the page. Need to know how to identify which cropper instance triggered the event.
from ngcropper.
Hi stianjensen!
One thing that I did to be able to run things after the "built.cropper" event is emited, is defining a 'built' function inside the options object.
For example:
$scope.options = {
maximize: true,
aspectRatio: 1/1,
built: function() {
$scope.determineAspectRatio(vm.fileTypeTitle);
};
}
This way you can define whatever function you want to run for each specific instance of a cropper.
Hope that helps you in any way!
from ngcropper.
Thanks, @nachoargentina
I see that the cropper plugin has made some changes in v11.0 related to events:
Convert "crop" option to "crop" event
So to support the next version of cropper, some way of listening to events would be required.
(https://github.com/fengyuanchen/cropper/blob/master/CHANGELOG.md#0110-aug-10-2015)
from ngcropper.
Related Issues (20)
- ngCropper doesn't work in Angular Modal HOT 3
- Not working with jQuery 2.2.0 HOT 3
- Error when not specifying 'build' option HOT 1
- ngCropper and angular 1.5 HOT 6
- Can not move the crop area horizontally
- Get main image not from input field HOT 2
- ngCropper on load new image -> not working HOT 1
- dragStart event preview
- Change aspectRatio on click
- Start cropper from img src
- maximize:true does not work all image resolutions
- How can trigger zoom event? HOT 4
- ngCropper error element.cropper is not a function HOT 1
- Not working with Angular 1.5.8 and jQuery 2.2.4 HOT 2
- Not Working with Angular js 1.6.1
- cannot upload new images again and again HOT 2
- Accessing get data method?
- Problem with EXIF Image Orientation
- Is there support for circular area selection when cropping HOT 1
- Please add license file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngcropper.