{"action":"created","issue":{"url":"https://api.github.com/repos/Mawi137/ngx-image-cropper/issues/85","repository_url":"https://api.github.com/repos/Mawi137/ngx-image-cropper","labels_url":"https://api.github.com/repos/Mawi137/ngx-image-cropper/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/Mawi137/ngx-image-cropper/issues/85/comments","events_url":"https://api.github.com/repos/Mawi137/ngx-image-cropper/issues/85/events","html_url":"https://github.com/Mawi137/ngx-image-cropper/issues/85","id":354223791,"node_id":"MDU6SXNzdWUzNTQyMjM3OTE=","number":85,"title":"image cropped on click","user":{"login":"rameezfsitix","id":34238269,"node_id":"MDQ6VXNlcjM0MjM4MjY5","avatar_url":"https://avatars2.githubusercontent.com/u/34238269?v=4","gravatar_id":"","url":"https://api.github.com/users/rameezfsitix","html_url":"https://github.com/rameezfsitix","followers_url":"https://api.github.com/users/rameezfsitix/followers","following_url":"https://api.github.com/users/rameezfsitix/following{/other_user}","gists_url":"https://api.github.com/users/rameezfsitix/gists{/gist_id}","starred_url":"https://api.github.com/users/rameezfsitix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rameezfsitix/subscriptions","organizations_url":"https://api.github.com/users/rameezfsitix/orgs","repos_url":"https://api.github.com/users/rameezfsitix/repos","events_url":"https://api.github.com/users/rameezfsitix/events{/privacy}","received_events_url":"https://api.github.com/users/rameezfsitix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-27T08:16:30Z","updated_at":"2018-09-19T05:52:11Z","closed_at":null,"author_association":"NONE","body":"Hi, how i can crop image on button click not drag the cropper. Thanks in advance "},"comment":{"url":"https://api.github.com/repos/Mawi137/ngx-image-cropper/issues/comments/422662665","html_url":"https://github.com/Mawi137/ngx-image-cropper/issues/85#issuecomment-422662665","issue_url":"https://api.github.com/repos/Mawi137/ngx-image-cropper/issues/85","id":422662665,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjY2MjY2NQ==","user":{"login":"CreativeAcer","id":15908395,"node_id":"MDQ6VXNlcjE1OTA4Mzk1","avatar_url":"https://avatars3.githubusercontent.com/u/15908395?v=4","gravatar_id":"","url":"https://api.github.com/users/CreativeAcer","html_url":"https://github.com/CreativeAcer","followers_url":"https://api.github.com/users/CreativeAcer/followers","following_url":"https://api.github.com/users/CreativeAcer/following{/other_user}","gists_url":"https://api.github.com/users/CreativeAcer/gists{/gist_id}","starred_url":"https://api.github.com/users/CreativeAcer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CreativeAcer/subscriptions","organizations_url":"https://api.github.com/users/CreativeAcer/orgs","repos_url":"https://api.github.com/users/CreativeAcer/repos","events_url":"https://api.github.com/users/CreativeAcer/events{/privacy}","received_events_url":"https://api.github.com/users/CreativeAcer/received_events","type":"User","site_admin":false},"created_at":"2018-09-19T05:52:11Z","updated_at":"2018-09-19T05:52:11Z","author_association":"NONE","body":"To enable this i just added an input to trigger the crop on a button click and set autoTriggerCrop to false.\r\nAdded to image crop component \r\n ``@Input()\r\n    set triggerCrop(crop: Boolean) {\r\n        if (crop) { this.crop(); }\r\n    }``\r\n\r\nand in the html you add in your page\r\n[autoTriggerCrop]=\"false\" [triggerCrop]=\"yourbuttonvar\"\r\nyour button click will set yourbuttonvar to true which will trigger the cropping function"}}
{"actor":{"display_login":"CreativeAcer"}}