Merge pull request #25749 from knuthelgesen/master

[@types/croppie] Added the method "get()" from the Croppie library
This commit is contained in:
Ron Buckton
2018-05-14 16:40:56 -07:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -22,4 +22,6 @@ c.result({ type: 'blob' }).then(blob => {
x = blob;
});
c.get();
c.destroy();

View File

@@ -3,6 +3,7 @@
// Definitions by: Connor Peet <https://github.com/connor4312>
// dklmuc <https://github.com/dklmuc>
// Sarun Intaralawan <https://github.com/sarunint>
// Knut Erik Helgesen <https://github.com/knuthelgesen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace Croppie;
@@ -26,6 +27,8 @@ declare class Croppie {
result(options: Croppie.ResultOptions & { type: 'rawcanvas' }): Promise<HTMLCanvasElement>;
result(options?: Croppie.ResultOptions): Promise<HTMLCanvasElement>;
get(): Croppie.CropData;
rotate(degrees: 90 | 180 | 270 | -90 | -180 | -270): void;
setZoom(zoom: number): void;
@@ -59,4 +62,10 @@ declare namespace Croppie {
showZoomer?: boolean;
viewport?: { width: number, height: number, type?: CropType };
}
interface CropData {
points?: number[];
orientation?: number;
zoom?: number;
}
}