UNPKG

nehan

Version:

Html layout engine for paged-media written in Typescript

34 lines 1.19 kB
import { Utils, BasicStyle, CssCascade, } from "./public-api"; export var TextJustifyValue; (function (TextJustifyValue) { TextJustifyValue["NONE"] = "none"; TextJustifyValue["AUTO"] = "auto"; TextJustifyValue["INTER_WORD"] = "inter-word"; TextJustifyValue["INTER_CHARACTER"] = "inter-character"; })(TextJustifyValue || (TextJustifyValue = {})); export class TextJustify { constructor(value) { this.value = BasicStyle.selectOrDefault("text-justify", value, TextJustify.values); } static load(element) { let value = CssCascade.getValue(element, "text-justify"); return new TextJustify(value); } isNone() { return this.value === TextJustifyValue.NONE; } isAuto() { return this.value === TextJustifyValue.AUTO; } isJustifyWord() { return this.value === TextJustifyValue.INTER_WORD; } isJustifyCharacter() { return this.value === TextJustifyValue.INTER_CHARACTER; } isJustifySpacing() { return this.isJustifyWord() || this.isJustifyCharacter(); } } TextJustify.values = Utils.Enum.toValueArray(TextJustifyValue); //# sourceMappingURL=text-justify.js.map