mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
type complement
This commit is contained in:
11
src/Shape.ts
11
src/Shape.ts
@@ -21,6 +21,9 @@ export type ShapeConfigHandler<TTarget> = {
|
|||||||
bivarianceHack(ctx: Context, shape: TTarget): void;
|
bivarianceHack(ctx: Context, shape: TTarget): void;
|
||||||
}['bivarianceHack'];
|
}['bivarianceHack'];
|
||||||
|
|
||||||
|
export type LineJoin = 'round' | 'bevel' | 'miter';
|
||||||
|
export type LineCap = 'butt' | 'round' | 'square';
|
||||||
|
|
||||||
export interface ShapeConfig extends NodeConfig {
|
export interface ShapeConfig extends NodeConfig {
|
||||||
fill?: string;
|
fill?: string;
|
||||||
fillPatternImage?: HTMLImageElement;
|
fillPatternImage?: HTMLImageElement;
|
||||||
@@ -58,8 +61,8 @@ export interface ShapeConfig extends NodeConfig {
|
|||||||
strokeScaleEnabled?: boolean;
|
strokeScaleEnabled?: boolean;
|
||||||
strokeHitEnabled?: boolean;
|
strokeHitEnabled?: boolean;
|
||||||
strokeEnabled?: boolean;
|
strokeEnabled?: boolean;
|
||||||
lineJoin?: string;
|
lineJoin?: LineJoin;
|
||||||
lineCap?: string;
|
lineCap?: LineCap;
|
||||||
sceneFunc?: (con: Context, shape: Shape) => void;
|
sceneFunc?: (con: Context, shape: Shape) => void;
|
||||||
hitFunc?: (con: Context, shape: Shape) => void;
|
hitFunc?: (con: Context, shape: Shape) => void;
|
||||||
shadowColor?: string;
|
shadowColor?: string;
|
||||||
@@ -789,8 +792,8 @@ export class Shape<Config extends ShapeConfig = ShapeConfig> extends Node<
|
|||||||
fillPatternY: GetSet<number, this>;
|
fillPatternY: GetSet<number, this>;
|
||||||
fillPriority: GetSet<string, this>;
|
fillPriority: GetSet<string, this>;
|
||||||
hitFunc: GetSet<ShapeConfigHandler<this>, this>;
|
hitFunc: GetSet<ShapeConfigHandler<this>, this>;
|
||||||
lineCap: GetSet<string, this>;
|
lineCap: GetSet<LineCap, this>;
|
||||||
lineJoin: GetSet<string, this>;
|
lineJoin: GetSet<LineJoin, this>;
|
||||||
perfectDrawEnabled: GetSet<boolean, this>;
|
perfectDrawEnabled: GetSet<boolean, this>;
|
||||||
sceneFunc: GetSet<ShapeConfigHandler<this>, this>;
|
sceneFunc: GetSet<ShapeConfigHandler<this>, this>;
|
||||||
shadowColor: GetSet<string, this>;
|
shadowColor: GetSet<string, this>;
|
||||||
|
Reference in New Issue
Block a user