UNPKG

devexpress-richedit

Version:

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

41 lines (40 loc) 1.25 kB
import { LineNumberingRestartType } from './enums'; export class LineNumberDefaults { static countBy = 0; static start = 1; static distance = 360; static restart = LineNumberingRestartType.NewPage; } export class LineNumberingProperties { countBy; start; distance; restart; constructor(countBy = LineNumberDefaults.countBy, start = LineNumberDefaults.start, distance = LineNumberDefaults.distance, restart = LineNumberDefaults.restart) { this.countBy = countBy; this.start = start; this.distance = distance; this.restart = restart; } get isDefined() { return this.countBy !== LineNumberDefaults.countBy; } copyFrom(obj) { this.countBy = obj.countBy; this.distance = obj.distance; this.restart = obj.restart; this.start = obj.start; } clone() { const result = new LineNumberingProperties(); result.copyFrom(this); return result; } equals(obj) { return obj && this.countBy === obj.countBy && this.distance === obj.distance && this.restart === obj.restart && this.start === obj.start; } }