Comparing version 1.5.1 to 1.6.0
@@ -307,2 +307,8 @@ /** | ||
/** | ||
* Event handler type for {@linkcode CropArea} `statechange` event. | ||
* | ||
* @since 1.6.0 | ||
*/ | ||
declare type StateChangeEventHandler = (state: CropAreaState) => void; | ||
/** | ||
* CROPRO display mode - `inline` or `popup` (full screen). | ||
@@ -418,2 +424,3 @@ */ | ||
private closeEventListeners; | ||
private stateChangeEventListeners; | ||
private _isOpen; | ||
@@ -587,2 +594,19 @@ private topToolbar; | ||
removeCloseEventListener(listener: CloseEventHandler): void; | ||
/** | ||
* Add a `statechange` event handler to perform actions in your code after | ||
* the state of the CropArea changes. | ||
* | ||
* @param listener - state change event listener | ||
* | ||
* @since 1.6.0 | ||
*/ | ||
addStateChangeEventListener(listener: StateChangeEventHandler): void; | ||
/** | ||
* Remove a `statechange` event handler. | ||
* | ||
* @param listener - previously registered `statechange` event handler. | ||
* | ||
* @since 1.6.0 | ||
*/ | ||
removeStateChangeEventListener(listener: StateChangeEventHandler): void; | ||
private setupResizeObserver; | ||
@@ -660,2 +684,4 @@ private onPopupResize; | ||
private render; | ||
private previousState; | ||
private onStateChanged; | ||
private addStyles; | ||
@@ -662,0 +688,0 @@ } |
{ | ||
"name": "cropro", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "javascript image cropping library", | ||
@@ -5,0 +5,0 @@ "main": "cropro.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
539050
1219