You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.8 KiB

4 months ago
import type { DisplayObjectConfig } from '@antv/g';
import type { Graph } from '../runtime/graph';
import type { ElementDatum, StyleIterationContext } from '../types';
/**
* <zh/>
*
* <en/> compute dynamic style that supports callback
* @param callableStyle - <zh/> | <en/> dynamic style
* @param context - <zh/> | <en/> style iteration context
* @returns <zh/> | <en/> static style
*/
export declare function computeElementCallbackStyle(callableStyle: Record<string, unknown> | ((this: Graph, datum: ElementDatum) => Record<string, unknown>) | {
[key: string]: (this: Graph, datum: ElementDatum) => unknown;
}, context: StyleIterationContext): {
[k: string]: any;
};
/**
* <zh/>
*
* <en/> Merge shape configuration
* @param defaultOptions - <zh/> 1 | <en/> configuration 1
* @param modifiedOptions - <zh/> 2 | <en/> configuration 2
* @returns <zh/> | <en/> merged configuration
*/
export declare function mergeOptions(defaultOptions: DisplayObjectConfig<any>, modifiedOptions: DisplayObjectConfig<any>): DisplayObjectConfig<any>;
/**
* <zh/>
*
* <en/> Get the style of the sub-shape of the shape
* @param style - <zh/> | <en/> shape style
* @returns <zh/> | <en/> sub-shape style
* @remarks
* <zh/>
*
* <en/> Extracts the shape styles from a given attribute object.
* Removes specific styles like position, transformation, and class name.
*/
export declare function getSubShapeStyle<T extends Record<string, any>>(style: T): Omit<T, 'x' | 'y' | 'z' | 'transform' | 'transformOrigin' | 'className' | 'class' | 'zIndex' | 'visibility'>;