@antv/g-gesture
Advanced tools
Comparing version 0.0.25 to 0.0.26
@@ -1,2 +0,2 @@ | ||
import type { Canvas, Rect, RenderingPlugin, RenderingService } from '@antv/g'; | ||
import type { Canvas, Circle, Polyline, Rect, RenderingPlugin, RenderingService } from '@antv/g'; | ||
import { DrawerTool } from './constants/enum'; | ||
@@ -20,2 +20,14 @@ import type { BaseDrawer, DrawerState } from './interface/drawer'; | ||
brushRect: Rect; | ||
/** | ||
* control points on polyline | ||
*/ | ||
polylineControlPoints: Circle[]; | ||
/** | ||
* the whole polyline except for last segment | ||
*/ | ||
savedPolyline: Polyline; | ||
/** | ||
* the last segment of polyline | ||
*/ | ||
polylineLastSegment: Polyline; | ||
private hideDrawer; | ||
@@ -38,3 +50,3 @@ /** | ||
*/ | ||
setDrawer(tool: DrawerTool, options: any): any; | ||
setDrawer(tool: DrawerTool, options: any): BaseDrawer; | ||
/** | ||
@@ -41,0 +53,0 @@ * 冻结绘制工具 |
@@ -0,1 +1,2 @@ | ||
import type { FederatedEvent } from '@antv/g'; | ||
import { DrawerTool } from '../constants/enum'; | ||
@@ -10,4 +11,4 @@ import { BaseDrawer } from '../interface/drawer'; | ||
}; | ||
onMouseDown(e: any): void; | ||
onMouseMove(e: any): void; | ||
onMouseDown(e: FederatedEvent): void; | ||
onMouseMove(e: FederatedEvent): void; | ||
onMouseUp(): void; | ||
@@ -20,3 +21,3 @@ /** | ||
*/ | ||
onKeyDown(e: any): void; | ||
onKeyDown(e: KeyboardEvent): void; | ||
onMouseDbClick(): void; | ||
@@ -23,0 +24,0 @@ closePath(): void; |
@@ -0,1 +1,2 @@ | ||
import type { FederatedEvent } from '@antv/g'; | ||
import { DrawerTool } from '../constants/enum'; | ||
@@ -11,6 +12,6 @@ import { BaseDrawer } from '../interface/drawer'; | ||
}; | ||
onMouseDown(e: any): void; | ||
onMouseMove(e: any): void; | ||
onMouseDown(e: FederatedEvent): void; | ||
onMouseMove(e: FederatedEvent): void; | ||
onMouseUp(): void; | ||
onMouseDbClick(e: any): void; | ||
onMouseDbClick(e: FederatedEvent): void; | ||
/** | ||
@@ -22,3 +23,3 @@ * esc -> 取消 | ||
*/ | ||
onKeyDown(e: any): void; | ||
onKeyDown(e: KeyboardEvent): void; | ||
closePath(): void; | ||
@@ -25,0 +26,0 @@ reset(): void; |
@@ -0,1 +1,2 @@ | ||
import type { FederatedEvent } from '@antv/g'; | ||
import { DrawerTool } from '../constants/enum'; | ||
@@ -14,5 +15,5 @@ import type { Point } from '../interface/drawer'; | ||
}; | ||
onMouseDown(e: any): void; | ||
onMouseMove(e: any): void; | ||
onMouseUp(e: any): void; | ||
onMouseDown(e: FederatedEvent): void; | ||
onMouseMove(e: FederatedEvent): void; | ||
onMouseUp(e: FederatedEvent): void; | ||
onMouseDbClick(): void; | ||
@@ -19,0 +20,0 @@ onKeyDown(): void; |
@@ -1,2 +0,2 @@ | ||
import type { Canvas } from '@antv/g'; | ||
import type { Canvas, FederatedEvent } from '@antv/g'; | ||
import EventEmitter from 'eventemitter3'; | ||
@@ -39,6 +39,6 @@ import type { DrawerTool } from '../constants/enum'; | ||
constructor(drawerOptions: DrawerOption); | ||
abstract onMouseDown(e: any): void; | ||
abstract onMouseMove(e: any): void; | ||
abstract onMouseUp(e: any): void; | ||
abstract onMouseDbClick(e: any): void; | ||
abstract onMouseDown(e: FederatedEvent): void; | ||
abstract onMouseMove(e: FederatedEvent): void; | ||
abstract onMouseUp(e: FederatedEvent): void; | ||
abstract onMouseDbClick(e: FederatedEvent): void; | ||
abstract onKeyDown(e: KeyboardEvent): void; | ||
@@ -45,0 +45,0 @@ setCanvas(canvas: Canvas): void; |
@@ -0,3 +1,4 @@ | ||
import type { AnnotationPlugin } from '../AnnotationPlugin'; | ||
import type { DrawerState } from '../interface/drawer'; | ||
export declare const renderDrawLine: (context: any, anno: DrawerState) => void; | ||
export declare const renderDrawLine: (context: AnnotationPlugin, anno: DrawerState) => void; | ||
//# sourceMappingURL=drawline-render.d.ts.map |
@@ -0,3 +1,4 @@ | ||
import type { AnnotationPlugin } from '../AnnotationPlugin'; | ||
import type { DrawerState } from '../interface/drawer'; | ||
export declare const renderDrawPoints: (context: any, anno: DrawerState) => void; | ||
export declare const renderDrawPoints: (context: AnnotationPlugin, anno: DrawerState) => void; | ||
//# sourceMappingURL=drawPoint-render.d.ts.map |
@@ -0,3 +1,4 @@ | ||
import type { AnnotationPlugin } from '../AnnotationPlugin'; | ||
import type { DrawerState } from '../interface/drawer'; | ||
export declare const renderPolyline: (context: any, anno: DrawerState) => void; | ||
export declare const renderPolyline: (context: AnnotationPlugin, anno: DrawerState) => void; | ||
//# sourceMappingURL=polyline-render.d.ts.map |
import type { PointLike } from '@antv/g'; | ||
export declare function isInvalidRect(p: PointLike, q: PointLike, threshold: number): boolean; | ||
export declare function isNearPoint(p: PointLike, q: PointLike, threshold: number): boolean; | ||
//# sourceMappingURL=drawer.d.ts.map |
@@ -121,2 +121,4 @@ import { Syringe } from 'mana-syringe'; | ||
skipParse: boolean; | ||
forceUpdateGeometry: boolean; | ||
usedAttributes: string[]; | ||
} | ||
@@ -123,0 +125,0 @@ export declare const StyleValueRegistry: Syringe.DefinedToken; |
import type { DisplayObject } from '../../display-objects'; | ||
import type { CSSGradientValue } from '../cssom'; | ||
import { CSSKeywordValue, CSSRGB } from '../cssom'; | ||
import type { CSSGradientValue, CSSRGB } from '../cssom'; | ||
import { CSSKeywordValue } from '../cssom'; | ||
import { CSSProperty } from '../CSSProperty'; | ||
@@ -5,0 +5,0 @@ import type { Pattern } from '../parser/color'; |
import type { DisplayObject } from '../display-objects'; | ||
import type { BaseStyleProps } from '../types'; | ||
import type { CSSStyleValue } from './cssom'; | ||
import { CSSKeywordValue, CSSRGB } from './cssom'; | ||
import type { PropertyMetadata, PropertyParseOptions } from './interfaces'; | ||
@@ -11,3 +12,13 @@ import { StyleValueRegistry } from './interfaces'; | ||
export declare const BUILT_IN_PROPERTIES: PropertyMetadata[]; | ||
export declare const getMetadata: (name: string) => PropertyMetadata; | ||
export declare const cache: Record<string, PropertyMetadata>; | ||
export declare const unsetKeywordValue: CSSKeywordValue; | ||
export declare const initialKeywordValue: CSSKeywordValue; | ||
export declare const inheritKeywordValue: CSSKeywordValue; | ||
export declare const noneColor: CSSRGB; | ||
export declare const transparentColor: CSSRGB; | ||
export declare const getOrCreateRGBA: { | ||
(...args: any[]): any; | ||
cache: Map<any, any>; | ||
}; | ||
export declare const getOrCreateKeyword: (name: string) => CSSKeywordValue; | ||
export declare class DefaultStyleValueRegistry implements StyleValueRegistry { | ||
@@ -14,0 +25,0 @@ /** |
@@ -222,3 +222,3 @@ import type { mat3, vec2 } from 'gl-matrix'; | ||
*/ | ||
get(name: keyof DisplayObjectConfig<StyleProps>): string | number | boolean | StyleProps; | ||
get(name: keyof DisplayObjectConfig<StyleProps>): any; | ||
/** | ||
@@ -225,0 +225,0 @@ * compatible with G 3.0 |
@@ -0,3 +1,3 @@ | ||
import type { AnimationTimeline } from './AnimationTimeline'; | ||
import type { KeyframeEffect } from './KeyframeEffect'; | ||
import type { AnimationTimeline } from './AnimationTimeline'; | ||
/** | ||
@@ -97,2 +97,3 @@ * @see https://developer.mozilla.org/en-US/docs/Web/API/Animation/Animation | ||
get _isFinished(): boolean; | ||
_totalDuration: number; | ||
get totalDuration(): number; | ||
@@ -99,0 +100,0 @@ _inEffect: boolean; |
@@ -148,2 +148,5 @@ import { Cullable, Geometry, RBushNode, Renderable, Sortable, Transform } from '../components'; | ||
computedStyle: any; | ||
/** | ||
* Renderers will use these used values. | ||
*/ | ||
parsedStyle: ParsedStyleProps; | ||
@@ -150,0 +153,0 @@ /** |
@@ -245,2 +245,3 @@ import type { Camera } from '../camera'; | ||
style?: StyleProps; | ||
initialParsedStyle?: any; | ||
/** | ||
@@ -247,0 +248,0 @@ * compatible with G 3.0 |
@@ -53,3 +53,3 @@ import type { vec2, vec3 } from 'gl-matrix'; | ||
*/ | ||
pointerEvents?: 'none' | 'auto' | 'stroke' | 'fill' | 'painted' | 'visible' | 'visiblestroke' | 'visiblefill' | 'visiblepainted' | 'bounding-box' | 'all' | CSSGlobalKeywords; | ||
pointerEvents?: 'none' | 'auto' | 'stroke' | 'fill' | 'painted' | 'visible' | 'visiblestroke' | 'visiblefill' | 'visiblepainted' | 'all' | CSSGlobalKeywords; | ||
/** | ||
@@ -78,9 +78,9 @@ * z-index in CSS | ||
/** 描边透明度 */ | ||
strokeOpacity?: number; | ||
strokeOpacity?: number | string; | ||
/** 填充颜色 */ | ||
fill?: ColorType | Pattern; | ||
/** 填充透明度 */ | ||
fillOpacity?: number; | ||
fillOpacity?: number | string; | ||
/** 整体透明度 */ | ||
opacity?: number; | ||
opacity?: number | string; | ||
/** | ||
@@ -178,3 +178,6 @@ * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width | ||
} | ||
export interface ParsedBaseStyleProps extends Omit<BaseStyleProps, 'anchor' | 'fill' | 'stroke' | 'lineWidth' | 'increasedLineWidthForHitTesting' | 'lineDash' | 'path' | 'points' | 'shadowColor' | 'transform' | 'transformOrigin' | 'miterLimit' | 'filter'> { | ||
export interface ParsedBaseStyleProps extends Omit<BaseStyleProps, 'anchor' | 'fill' | 'stroke' | 'lineWidth' | 'increasedLineWidthForHitTesting' | 'lineDash' | 'path' | 'points' | 'shadowColor' | 'transform' | 'transformOrigin' | 'miterLimit' | 'filter' | 'opacity' | 'fillOpacity' | 'strokeOpacity'> { | ||
opacity?: number; | ||
fillOpacity?: number; | ||
strokeOpacity?: number; | ||
fill?: CSSRGB | CSSGradientValue[] | Pattern; | ||
@@ -181,0 +184,0 @@ stroke?: CSSRGB | CSSGradientValue[] | Pattern; |
@@ -11,2 +11,3 @@ export * from './assert'; | ||
export * from './path'; | ||
export * from './pointer-events'; | ||
export * from './string'; | ||
@@ -13,0 +14,0 @@ export * from './tapable'; |
{ | ||
"name": "@antv/g-gesture", | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"description": "G Gesture", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@antv/g-mobile-canvas": "^0.7.6", | ||
"@antv/g-mobile-canvas": "^0.8.0", | ||
"@antv/g-mobile-canvas-element": "^0.6.3" | ||
@@ -41,3 +41,3 @@ }, | ||
}, | ||
"gitHead": "09da520d465a2d845f6fea6b327014f7c4ddc0ca" | ||
"gitHead": "a968c22aa4b8e8619379dc1a2d02ae2fbac5b478" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1021552
1261
14620