Gathering detailed insights and metrics for cropperjs-wrapper
Gathering detailed insights and metrics for cropperjs-wrapper
Gathering detailed insights and metrics for cropperjs-wrapper
Gathering detailed insights and metrics for cropperjs-wrapper
npm install cropperjs-wrapper
Typescript
Module System
Node Version
NPM Version
TypeScript (58.06%)
CSS (25.91%)
JavaScript (8.5%)
HTML (7.54%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
5 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Dec 25, 2020
Latest Version
0.0.4
Package Id
cropperjs-wrapper@0.0.4
Unpacked Size
160.35 kB
Size
29.54 kB
File Count
26
NPM Version
6.4.1
Node Version
10.13.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
3
CropperJS integration for Angular 7+
1- Install the library:
1$ npm install cropperjs-wrapper --save
2- Import and load CropperjsWrapperModule
in the module you want to use, for example AppModule
:
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3 4import { AppComponent } from './app.component'; 5 6// 7// Import cropperjs-wrapper 8import { CropperjsWrapperModule } from 'cropperjs-wrapper'; 9 10@NgModule({ 11 declarations: [AppComponent], 12 imports: [ 13 BrowserModule, 14 15 // 16 // Load cropperjs-wrapper 17 CropperjsWrapperModule 18 ], 19 providers: [], 20 bootstrap: [AppComponent] 21}) 22export class AppModule {}
3- Use the component in your template like this:
1<!-- You can now use cropper-wrapper component in app.component.html --> 2<cropper-wrapper [cropperOptions]="config" [imageUrl]="imageUrl"></cropper-wrapper>
Using CropperJS methods:
Use @ViewChild in your component to get the element:
In your app.component.html
1<cropper-wrapper #cropperWrapper ..></cropper-wrapper>
And in your app.component.ts
1 2// 3// Import CropperWrapperComponent 4import { CropperWrapperComponent } from 'cropper-wrapper'; 5 6// 7// Get with @ViewChild 8@ViewChild('cropperWrapper') public cropperWrapper: CropperWrapperComponent;
Then just call the CropperJS method you want:
anywhere in your app.component.ts
1// 2// Lets try to zoom 3this.cropperWrapper.cropper.zoom(0.1);
This project was generated with Angular CLI version 7.2.0.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.
MIT © Ravi Jain
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
116 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More