mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 13:26:07 +08:00
huge typescript fixes, remove Object.assign usage
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
import { Util, Collection } from './Util';
|
||||
import { Factory } from './Factory';
|
||||
import { Node, ids, names } from './Node';
|
||||
import { Node, ids, names, NodeConfig } from './Node';
|
||||
import { DD } from './DragAndDrop';
|
||||
import { getNumberValidator } from './Validators';
|
||||
|
||||
import { GetSet, IRect } from './types';
|
||||
|
||||
export interface ContainerConfig extends NodeConfig {
|
||||
clearBeforeDraw?: boolean;
|
||||
clipFunc?: (ctx: CanvasRenderingContext2D) => void;
|
||||
clipX?: number;
|
||||
clipY?: number;
|
||||
clipWidth?: number;
|
||||
clipHeight?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Container constructor. Containers are used to contain nodes or other containers
|
||||
* @constructor
|
||||
@@ -16,7 +25,7 @@ import { GetSet, IRect } from './types';
|
||||
* @@nodeParams
|
||||
* @@containerParams
|
||||
*/
|
||||
export abstract class Container extends Node {
|
||||
export abstract class Container extends Node<ContainerConfig> {
|
||||
children = new Collection();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user