mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Merge branch 'master' of github.com:konvajs/konva
This commit is contained in:
commit
f48e21450e
@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
* Typescript defs for `Konva.Transformer`
|
* Typescript defs for `Konva.Transformer`
|
||||||
|
* Typescript defs for `globalCompositeOperation`
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
|
13
konva.d.ts
vendored
13
konva.d.ts
vendored
@ -5,6 +5,16 @@ declare namespace Konva {
|
|||||||
var isDragReady: () => boolean;
|
var isDragReady: () => boolean;
|
||||||
var DD: any;
|
var DD: any;
|
||||||
|
|
||||||
|
type globalCompositeOperationType = '' |
|
||||||
|
'source-over' | 'source-in' | 'source-out' | 'source-atop' |
|
||||||
|
'destination-over' | 'destination-in' | 'destination-out' | 'destination-atop' |
|
||||||
|
'lighter' | 'copy' | 'xor' | 'multiply' |
|
||||||
|
'screen' | 'overlay' | 'darken' | 'lighten' |
|
||||||
|
'color-dodge' | 'color-burn' | 'hard-light' | 'soft-light' |
|
||||||
|
'difference' | 'exclusion' | 'hue' | 'saturation' |
|
||||||
|
'color' | 'luminosity'
|
||||||
|
;
|
||||||
|
|
||||||
export class Util {
|
export class Util {
|
||||||
static getRandomColor(): string;
|
static getRandomColor(): string;
|
||||||
static getRGB(color: string): string;
|
static getRGB(color: string): string;
|
||||||
@ -86,6 +96,7 @@ declare namespace Konva {
|
|||||||
dragDistance?: number;
|
dragDistance?: number;
|
||||||
dragBoundFunc?: (pos: Vector2d) => Vector2d;
|
dragBoundFunc?: (pos: Vector2d) => Vector2d;
|
||||||
preventDefault?: boolean;
|
preventDefault?: boolean;
|
||||||
|
globalCompositeOperation?: globalCompositeOperationType;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SizeConfig {
|
interface SizeConfig {
|
||||||
@ -282,6 +293,8 @@ declare namespace Konva {
|
|||||||
x(x: number): this;
|
x(x: number): this;
|
||||||
y(): number;
|
y(): number;
|
||||||
y(y: number): this;
|
y(y: number): this;
|
||||||
|
globalCompositeOperation(): globalCompositeOperationType;
|
||||||
|
globalCompositeOperation(type: globalCompositeOperationType): this;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ContainerConfig extends NodeConfig {
|
interface ContainerConfig extends NodeConfig {
|
||||||
|
Loading…
Reference in New Issue
Block a user