cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

Is it possible to set the bounds of a crop section? #97

Closed Fajeh closed 7 years ago

Fajeh commented 7 years ago

Hi guys,

with the onCrop-Event I am able to get the bounds of the current crop section. Is it possible to do it the other way around, to set the bounds of the current crop section ?

cstefanache commented 7 years ago

At the moment no - Moving for 0.8

Fajeh commented 7 years ago

Cool! Thank You =)!

fahad-nxvt commented 7 years ago

ETA on this?

cstefanache commented 7 years ago

Does: <img-cropper #cropper3 [image]="data3" [settings]="cropperSettings3" [(cropPosition)]="cropPosition">

this.cropPosition = new CropPosition(); this.cropPosition.x = 10; this.cropPosition.y = 10; this.cropPosition.w = 200; this.cropPosition.h = 250;

works for your case?

Fajeh commented 7 years ago

Hi,  Yes! Thank you :) 

Sent from my Samsung Galaxy smartphone. -------- Original message --------From: Cornel Stefanache notifications@github.com Date: 5/13/17 08:04 (GMT+01:00) To: cstefanache/angular2-img-cropper angular2-img-cropper@noreply.github.com Cc: Fajeh fjeglinski@stud.hs-bremen.de, Author author@noreply.github.com Subject: Re: [cstefanache/angular2-img-cropper] Is it possible to set the bounds of a crop section? (#97) Does:

<img-cropper #cropper3 [image]="data3" [settings]="cropperSettings3" [(cropPosition)]="cropPosition"> this.cropPosition = new CropPosition();

this.cropPosition.x = 10;

this.cropPosition.y = 10;

this.cropPosition.w = 200;

this.cropPosition.h = 250; works for your case?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/cstefanache/angular2-img-cropper","title":"cstefanache/angular2-img-cropper","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/cstefanache/angular2-img-cropper"}},"updates":{"snippets":[{"icon":"PERSON","message":"@cstefanache in #97: Does: \r\n\u003cimg-cropper #cropper3 [image]=\"data3\" [settings]=\"cropperSettings3\" [(cropPosition)]=\"cropPosition\"\u003e\u003c/img-cropper\u003e\r\n \r\n this.cropPosition = new CropPosition();\r\n this.cropPosition.x = 10;\r\n this.cropPosition.y = 10;\r\n this.cropPosition.w = 200;\r\n this.cropPosition.h = 250;\r\n\r\nworks for your case?"}],"action":{"name":"View Issue","url":"https://github.com/cstefanache/angular2-img-cropper/issues/97#issuecomment-301228014"}}}

cstefanache commented 7 years ago

Awesome! closing.