import { SectionPlanesPlugin } from "@xtctwins/tctwins-core"; import Controller from "../Controller"; import EventTrigger from "../EventTrigger"; /** * 表示切片工具类 * @class */ export default class SectionTool extends Controller { protected _sectionPlanesPlugin: SectionPlanesPlugin; protected _onHover: any; protected eventTrigger: EventTrigger; protected _isTouch: boolean; constructor(parent: any, cfg: any); /** * 初始化剖切点击事件 * */ protected _initSectionMode(): void; /** * 设置是否是触屏模式 * @param {boolean} isTouch */ set isTouch(isTouch: boolean); /** * 设置剖切方式 * @param {string} sectionWay */ set sectionWay(sectionWay: string); /** * 设置剖切面方向 * @param {number} direction */ set sectionDirection(direction: number); setControlPos(posRate: number): void; /** * 设置剖切对象样式 * @param {any} cfg * @param {number} cfg.planeSize * @param {number} cfg.controlSize * @param {number} cfg.planeOpacity * @param {number[]} cfg.controlFillColor * @param {number[]} cfg.controlEdgeColor */ set sectionConfigs(cfg: string); /** * 创建新的剖切面 * @param position * @param direction */ creatSection(position: any, direction: any): void; /** * 获取所有剖切面对象 * @returns 返回一个包含所有剖切id和对象的{} */ getSectionPlanes(): { [key: string]: import("@xtctwins/tctwins-core").SectionPlane; }; /** * 获取指定剖切面对象 * {[key: string]: SectionPlane} * @param id * @returns */ getSectionPlane(id: string): import("@xtctwins/tctwins-core").SectionPlane; /** * 激活指定id剖切面对象 * @param id */ setSectionEnable(id: string): void; /** * 取消激活指定id剖切面对象 * @param id */ setSectionDisable(id: string): void; /** * 设置指定id剖切面的位置 * @param pos */ setSectionPos(id: string, pos: number[]): void; /** * 翻转指定id剖切面对象 * @param id */ flipSection(id: string): void; /** * 获取剖切面对象数量 */ getNumSections(): number; /** * 清除所有剖切面 */ clear(): void; /** * 翻转所有剖切面 */ flipSections(): void; /** * 返回当前展示了的剖切面的id */ getShownControl(): void; /** * 激活所有剖切面 */ enableSections(): void; /** * 取消激活所有剖切面 */ disableSections(): void; /** * 隐藏所有展示了的剖切面 */ hideControl(): void; /** * 展示所有剖切面 */ showControl(): void; /** * * @param id 展示指定id的剖切面 */ showSectionPlane(id: string): void; /** * destroy所有和剖切组件相关的内容,包括剖切插件对象和所有剖切面 */ destroy(): void; /** * 删除指定剖切面 * @param id */ destroySectionPlane(id: string): void; }