Merge pull request #7038 from perkastman/master

Added possibility to register on events
This commit is contained in:
Masahiro Wakame
2015-12-10 21:03:24 +09:00
2 changed files with 13 additions and 0 deletions
+6
View File
@@ -37,3 +37,9 @@ cropboxWithOptions.update();
cropboxWithOptions.getDataURL();
cropboxWithOptions.getBlob();
cropboxWithOptions.remove();
cropboxWithOptions.on("cropbox",(e: Event, data: any, img: jQueryCropBox.Cropbox) => {
//DoStuff
});
+7
View File
@@ -103,7 +103,14 @@ declare module jQueryCropBox {
* Remove the cropbox functionality from the image.
*/
remove(): void;
/**
* Attach an event handler function for one event on the Crop Box
*/
on(event: string, callback: jQueryCropBox.EventCallback): void;
}
type EventCallback = (e: Event, data: any, img: jQueryCropBox.Cropbox) => void;
}
interface JQuery {