mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Added the statement of ActiveSelection (#25084)
* Added the statement of ActiveSelection A declaration about ActiveSelection has been added after Group. * Update types Line number 1723: changed any[] to Object[] Line number 1751: changed any to Group Line number 1751: changed "(activeSelection: ActiveSelection) => any" to "(activeSelection: ActiveSelection) => void"
This commit is contained in:
Vendored
+41
@@ -1710,6 +1710,47 @@ export class Group {
|
||||
static fromObject(object: any, callback: (group: Group) => any): void;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// ActiveSelection
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
export interface ActiveSelection extends Object, ICollection<Group> {}
|
||||
export class ActiveSelection {
|
||||
/**
|
||||
* Constructor
|
||||
* @param objects ActiveSelection objects
|
||||
* @param [options] Options object
|
||||
*/
|
||||
constructor(items?: Object[], options?: IObjectOptions);
|
||||
|
||||
/**
|
||||
* Change te activeSelection to a normal group,
|
||||
* High level function that automatically adds it to canvas as
|
||||
* active object. no events fired.
|
||||
*/
|
||||
toGroup(): Group;
|
||||
|
||||
/**
|
||||
* Removes objects from a collection, then renders canvas (if `renderOnAddRemove` is not `false`)
|
||||
* @param object Zero or more fabric instances
|
||||
* @return thisArg
|
||||
* @chainable
|
||||
*/
|
||||
remove(...object: Object[]): Group;
|
||||
|
||||
/**
|
||||
* Returns string represenation of a group
|
||||
*/
|
||||
toString(): string;
|
||||
|
||||
/**
|
||||
* Returns {@link fabric.ActiveSelection} instance from an object representation
|
||||
* @memberOf fabric.ActiveSelection
|
||||
* @param object Object to create a group from
|
||||
* @param [callback] Callback to invoke when an ActiveSelection instance is created
|
||||
*/
|
||||
static fromObject(object: Group, callback: (activeSelection: ActiveSelection) => void): void;
|
||||
}
|
||||
|
||||
interface IImageOptions extends IObjectOptions {
|
||||
/**
|
||||
* crossOrigin value (one of "", "anonymous", "allow-credentials")
|
||||
|
||||
Reference in New Issue
Block a user