UNPKG

devexpress-reporting

Version:

DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.

52 lines (51 loc) 1.93 kB
/** * DevExpress HTML/JS Reporting (designer\controls\xrPagebreak.js) * Version: 25.1.3 * Build date: Jun 26, 2025 * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs/universal.xml */ import * as ko from 'knockout'; import { XRControlSurfaceBase } from './xrControl'; export class XRPageBreakSurface extends XRControlSurfaceBase { preInitProperties(control, context) { this._width = ko.pureComputed({ read: () => { return context.pageWidth() - context.margins.right() - context.margins.left(); }, write: () => { } }); } constructor(control, context) { super(control, context, XRPageBreakSurface._unitProperties); this._disposables.push(this._width); this.template = 'dxrd-pagebreak'; this.contenttemplate = 'dxrd-line-content'; this.selectiontemplate = 'dxrd-pagebreak-selection'; this._disposables.push(this.linePosition = ko.pureComputed(() => { const rect = this.rect(); return { 'x1': 0, 'x2': rect.width, 'y1': rect.height / 2, 'y2': rect.height / 2 }; })); this.contentCss = ko.observable({ 'stroke': 'black', 'strokeWidth': 1, 'strokeDasharray': '4px, 4px' }); this._disposables.push(this.lineHeight = ko.pureComputed(() => { return this['position'].lineHeight() / this._context.zoom(); })); this.css = ko.observable({}); this._disposables.push(this.isIntersect = ko.pureComputed(() => { return false; })); } get isIntersectionDeny() { return true; } } XRPageBreakSurface._unitProperties = { _x: (o) => ko.observable(0), _y: (o) => o.location.y, _height: (o) => ko.observable(0.02 * o.dpi()) };