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