UNPKG

laya-coreui-es

Version:

laya核心库、ui库es版本,剔除了媒体、TTF等功能。基于 LayaAir-release_2.12.0 修改

25 lines (24 loc) 650 B
import { Pool } from "../../utils/Pool"; export class HTMLExtendStyle { constructor() { this.reset(); } reset() { this.stroke = 0; this.strokeColor = "#000000"; this.leading = 0; this.lineHeight = 0; this.letterSpacing = 0; this.href = null; return this; } recover() { if (this == HTMLExtendStyle.EMPTY) return; Pool.recover("HTMLExtendStyle", this.reset()); } static create() { return Pool.getItemByClass("HTMLExtendStyle", HTMLExtendStyle); } } HTMLExtendStyle.EMPTY = new HTMLExtendStyle();