Skip to content

Rectangle 矩形类 ​

判定 ​

isRectangle()

typescript
const isRectangle: (tar: any) => tar is Rectangle

属性 ​

readonly id: string 唯一标识 ​

name: string|undefined 名称 ​

property: Recorc<string|symbol,any> 属性 ​

parent: Entity 父级节点 ​

show: boolean 是否显示 ​

redonly label: Label|undefined ​

img: Img | (() => Img) 图片 ​

  • typescript
    type Img = string | HTMLCanvasElement | HTMLImageElement | HTMLVideoElement;

positions: Record<'west'|'south'|'east'|'north',number> 四至范围 ​

fillColor: MapColor 填充颜色 ​

rotation: number 旋转角度 ​

height: number 高度 ​

absolute: boolean 绝对定位 ​

shadows: boolean 阴影 ​

extrudedHeight: number 矩形本身的高度 ​

outlineColor: MapColor 描边颜色 ​

outlineWidth: number 描边宽度 ​

fill: boolean 是否填充 ​

outline: boolean 是否显示描边 ​

方法 ​

focus 聚焦 ​

  • duration 过渡时间(秒)
typescript
focus(duration?: number): void

destroy 销毁 ​

typescript
destroy(): boolean