Merge pull request #7038 from perkastman/master

Added possibility to register on events
This commit is contained in:
Masahiro Wakame committed 2015-12-10 21:03:24 +09:00
commit 2e056557a1
2 files changed
+13

No files matched your search

+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 {