mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-26 11:12:19 +08:00
Added possibility to register for events
This commit is contained in:
@@ -37,3 +37,9 @@ cropboxWithOptions.update();
|
||||
cropboxWithOptions.getDataURL();
|
||||
cropboxWithOptions.getBlob();
|
||||
cropboxWithOptions.remove();
|
||||
|
||||
cropboxWithOptions.on("cropbox",(e: Event, data: any, img: jQueryCropBox.Cropbox) => {
|
||||
|
||||
//DoStuff
|
||||
|
||||
});
|
||||
Vendored
+6
@@ -103,7 +103,13 @@ 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 {
|
||||
|
||||
Reference in New Issue
Block a user