devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
33 lines (32 loc) • 1.66 kB
JavaScript
import { LayoutPage, LayoutPageFlags } from '../../../../layout/main-structures/layout-page';
import { Log } from '../../logger/base-logger/log';
import { Pair } from '@devexpress/utils/lib/class/pair';
import { BaseFormatter, StdProps } from '../base-formatter';
export class CCF_LayoutPage extends BaseFormatter {
isHandleObject(obj) {
return obj instanceof LayoutPage;
}
getShortDescription(_config) {
return this.stdShow(new StdProps([
new Pair("", this.curr.index),
new Pair("offset", this.curr.getPosition()),
new Pair("", this.curr.isValid ? "valid" : "invalid")
]).showAsLine());
}
availableFullDescription(_config) {
return true;
}
getFullDescription(_config) {
return this.stdShow(new StdProps([
new Pair("index", this.curr.index),
new Pair("isValid", this.curr.isValid),
new Pair("intervals", this.curr.getContentIntervals()),
new Pair("bounds", this.curr.createRectangle()),
new Pair("mainPageAreas", this.curr.mainSubDocumentPageAreas),
new Pair("otherPageAreas", this.stdShow(new StdProps(this.mapNumberAsKeyToListOfPairs(this.curr.otherPageAreas, (id) => id, (id, pa) => new Pair(id.toString(), pa))).showAsLine().setStdNumElements()).setInlineBlockType()),
new Pair("anchoredObjectHolder", this.curr.anchoredObjectHolder),
new Pair("flags", Log.mask(LayoutPageFlags, this.curr.flags.getValue())),
]).showAsColumn());
}
}
CCF_LayoutPage._foo = BaseFormatter.addToFormattersList(new CCF_LayoutPage());