Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions types/fabric/fabric-impl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down