mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Fixed Fabric Object animation function to include correct parameters (#39069)
* fixed object animate function to include correct parameters * credit * guess not since you can't use gitlab urls * updated fabric version number * only allow major and minor patch * fixed some inaccurate documentation and added properties interface to parameter
This commit is contained in:
parent
c2e9725e3d
commit
90eb4f593a
19
types/fabric/fabric-impl.d.ts
vendored
19
types/fabric/fabric-impl.d.ts
vendored
@ -368,10 +368,10 @@ interface IObjectAnimation<T> {
|
||||
/**
|
||||
* Animates object's properties
|
||||
* object.animate({ left: ..., top: ... }, { duration: ... });
|
||||
* @param properties Properties to animate
|
||||
* @param value Options object
|
||||
* @param properties Properties to animate with values to animate to
|
||||
* @param options The animation options
|
||||
*/
|
||||
animate(properties: any, options?: IAnimationOptions): Object;
|
||||
animate(properties: {[key: string]: number | string}, options?: IAnimationOptions): Object;
|
||||
}
|
||||
interface IAnimationOptions {
|
||||
/**
|
||||
@ -3506,8 +3506,19 @@ export class Object {
|
||||
intersectsWithRect(pointTL: any, pointBR: any, absolute?: boolean, calculate?: boolean): boolean;
|
||||
/**
|
||||
* Animates object's properties
|
||||
* object.animate('left', ..., {duration: ...});
|
||||
* @param property Property to animate
|
||||
* @param value Value to animate property
|
||||
* @param options The animation options
|
||||
*/
|
||||
animate(): Object;
|
||||
animate(property: string, value: number | string, options?: IAnimationOptions): Object;
|
||||
/**
|
||||
* Animates object's properties
|
||||
* object.animate({ left: ..., top: ... }, { duration: ... });
|
||||
* @param properties Properties to animate with values to animate to
|
||||
* @param options The animation options
|
||||
*/
|
||||
animate(properties: {[key: string]: number | string}, options?: IAnimationOptions): Object;
|
||||
/**
|
||||
* Calculate and returns the .coords of an object.
|
||||
* @return {Object} Object with tl, tr, br, bl ....
|
||||
|
||||
2
types/fabric/index.d.ts
vendored
2
types/fabric/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for FabricJS 3.0
|
||||
// Type definitions for FabricJS 3.4
|
||||
// Project: http://fabricjs.com/
|
||||
// Definitions by: Oliver Klemencic <https://github.com/oklemencic>
|
||||
// Joseph Livecchi <https://github.com/joewashear007>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user