UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

31 lines (30 loc) 985 B
import { UnitConverter } from '@devexpress/utils/lib/class/unit-converter'; export class TopAndBottomMarginsForRow { topMargin = 0; bottomMargin = 0; addCellTopMargin(topMargin) { if (this.topMargin < topMargin) this.topMargin = topMargin; } addCellBottomMargin(bottomMargin) { if (this.bottomMargin < bottomMargin) this.bottomMargin = bottomMargin; } sumOfBoth() { return this.topMargin + this.bottomMargin; } } export class TableRowHeightInfo { horizontalAlignment; preferredHeightValue; preferredHeightType; contentHeight; cantSplit; constructor(cantSplit, height, horizontalAlignment) { this.cantSplit = cantSplit; this.preferredHeightValue = UnitConverter.twipsToPixelsF(height.value); this.preferredHeightType = height.type; this.contentHeight = 0; this.horizontalAlignment = horizontalAlignment; } }