mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Added the method "get()" from the Croppie library so it's possible to read crop data (points, zoom and orientation)
Added an interface for the crop data
This commit is contained in:
@@ -22,4 +22,6 @@ c.result({ type: 'blob' }).then(blob => {
|
||||
x = blob;
|
||||
});
|
||||
|
||||
c.get();
|
||||
|
||||
c.destroy();
|
||||
|
||||
Vendored
+9
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user