devexpress-richedit 25.2.7 → 25.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/gulpfile.js +1 -1
- package/bin/index-custom.js +1 -1
- package/bin/localization-builder.js +1 -1
- package/bin/nspell-index.js +1 -1
- package/bin/nspell.webpack.config.js +1 -1
- package/bin/webpack-externals.js +1 -1
- package/bin/webpack.config.js +1 -1
- package/dist/dx.richedit.css +0 -1
- package/dist/dx.richedit.d.ts +1 -1
- package/dist/dx.richedit.js +226 -172
- package/dist/dx.richedit.min.js +2 -2
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/lib/client/default-localization.js +7 -7
- package/lib/client/public/utils.js +5 -1
- package/lib/common/canvas/renderes/common/document-renderer.js +7 -1
- package/lib/common/commands/border-command-options.d.ts +7 -0
- package/lib/common/commands/border-command-options.js +8 -0
- package/lib/common/commands/dialogs/dialog-border-shading-command.js +13 -6
- package/lib/common/commands/tables/toggle-table-cells-border-command.d.ts +1 -1
- package/lib/common/commands/tables/toggle-table-cells-border-command.js +10 -3
- package/lib/common/event-manager.js +14 -7
- package/lib/common/layout-formatter/formatter/base-formatter.d.ts +1 -0
- package/lib/common/layout-formatter/formatter/base-formatter.js +11 -0
- package/lib/common/layout-formatter/row/result.d.ts +1 -1
- package/lib/common/layout-formatter/row/result.js +12 -17
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.d.ts +2 -1
- package/lib/common/layout-formatter/row/size-engine/row-formatting-info.js +7 -4
- package/lib/common/layout-formatter/row/size-engine/row-sizes-manager.js +1 -3
- package/package.json +3 -3
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -242,9 +242,9 @@ export function loadDefaultMessages() {
|
|
|
242
242
|
"XtraRichEditStringId.Caption_FollowingParagraphText": "Following Paragraph ",
|
|
243
243
|
"XtraRichEditStringId.Caption_GroupTableAlignment": "Alignment",
|
|
244
244
|
"XtraRichEditStringId.Caption_GroupTableCellSize": "Cell Size",
|
|
245
|
-
"XtraRichEditStringId.Caption_GroupTableDrawBorders": "Borders
|
|
245
|
+
"XtraRichEditStringId.Caption_GroupTableDrawBorders": "Borders & Shadings",
|
|
246
246
|
"XtraRichEditStringId.Caption_GroupTableMerge": "Merge",
|
|
247
|
-
"XtraRichEditStringId.Caption_GroupTableRowsAndColumns": "Rows
|
|
247
|
+
"XtraRichEditStringId.Caption_GroupTableRowsAndColumns": "Rows & Columns",
|
|
248
248
|
"XtraRichEditStringId.Caption_GroupTableStyleOptions": "Table Style Options",
|
|
249
249
|
"XtraRichEditStringId.Caption_GroupTableStyles": "Table Styles",
|
|
250
250
|
"XtraRichEditStringId.Caption_GroupTableTable": "Table",
|
|
@@ -1742,7 +1742,7 @@ export function loadDefaultMessages() {
|
|
|
1742
1742
|
"ASPxRichEditStringId.PageMailings": "Mail Merge",
|
|
1743
1743
|
"ASPxRichEditStringId.PageReview": "Review",
|
|
1744
1744
|
"ASPxRichEditStringId.PageView": "View",
|
|
1745
|
-
"ASPxRichEditStringId.PageHeaderAndFooter": "Header
|
|
1745
|
+
"ASPxRichEditStringId.PageHeaderAndFooter": "Header & Footer",
|
|
1746
1746
|
"ASPxRichEditStringId.PageTableDesign": "Design",
|
|
1747
1747
|
"ASPxRichEditStringId.PageTableLayout": "Layout",
|
|
1748
1748
|
"ASPxRichEditStringId.PageFloatingObjects": "Format",
|
|
@@ -1761,7 +1761,7 @@ export function loadDefaultMessages() {
|
|
|
1761
1761
|
"ASPxRichEditStringId.GroupSymbols": "Symbols",
|
|
1762
1762
|
"ASPxRichEditStringId.GroupLinks": "Links",
|
|
1763
1763
|
"ASPxRichEditStringId.GroupPages": "Pages",
|
|
1764
|
-
"ASPxRichEditStringId.GroupHeaderFooter": "Header
|
|
1764
|
+
"ASPxRichEditStringId.GroupHeaderFooter": "Header & Footer",
|
|
1765
1765
|
"ASPxRichEditStringId.GroupHeaderFooterToolsDesignClose": "Close",
|
|
1766
1766
|
"ASPxRichEditStringId.GroupHeaderFooterToolsDesignNavigation": "Navigation",
|
|
1767
1767
|
"ASPxRichEditStringId.GroupMailMerge": "Mail Merge",
|
|
@@ -1786,9 +1786,9 @@ export function loadDefaultMessages() {
|
|
|
1786
1786
|
"ASPxRichEditStringId.GroupView": "View",
|
|
1787
1787
|
"ASPxRichEditStringId.GroupTableToolsDesignTableStyleOptions": "Table Style Options",
|
|
1788
1788
|
"ASPxRichEditStringId.GroupTableToolsDesignTableStyles": "Table Styles",
|
|
1789
|
-
"ASPxRichEditStringId.GroupTableToolsDesignBordersAndShadings": "Borders
|
|
1789
|
+
"ASPxRichEditStringId.GroupTableToolsDesignBordersAndShadings": "Borders & Shadings",
|
|
1790
1790
|
"ASPxRichEditStringId.GroupTableToolsLayoutTable": "Table",
|
|
1791
|
-
"ASPxRichEditStringId.GroupTableToolsLayoutRowsAndColumns": "Rows
|
|
1791
|
+
"ASPxRichEditStringId.GroupTableToolsLayoutRowsAndColumns": "Rows & Columns",
|
|
1792
1792
|
"ASPxRichEditStringId.GroupTableToolsLayoutMerge": "Merge",
|
|
1793
1793
|
"ASPxRichEditStringId.GroupTableToolsLayoutCellSize": "Cell Size",
|
|
1794
1794
|
"ASPxRichEditStringId.GroupTableToolsLayoutAlignment": "Alignment",
|
|
@@ -2181,7 +2181,7 @@ export function loadDefaultMessages() {
|
|
|
2181
2181
|
"RichEditExtensionsStringId.Caption_GroupFloatingPictureToolsArrange": "Arrange",
|
|
2182
2182
|
"RichEditExtensionsStringId.Caption_GroupFloatingPictureToolsShapeStyles": "Shape Styles",
|
|
2183
2183
|
"RichEditExtensionsStringId.Caption_GroupFont": "Font",
|
|
2184
|
-
"RichEditExtensionsStringId.Caption_GroupHeaderFooter": "Header
|
|
2184
|
+
"RichEditExtensionsStringId.Caption_GroupHeaderFooter": "Header & Footer",
|
|
2185
2185
|
"RichEditExtensionsStringId.Caption_GroupHeaderFooterToolsDesignClose": "Close",
|
|
2186
2186
|
"RichEditExtensionsStringId.Caption_GroupHeaderFooterToolsDesignNavigation": "Navigation",
|
|
2187
2187
|
"RichEditExtensionsStringId.Caption_GroupHeaderFooterToolsDesignOptions": "Options",
|
|
@@ -74,7 +74,11 @@ export class Utils {
|
|
|
74
74
|
static getTrimmedMessage(id) {
|
|
75
75
|
const message = formatMessage(id);
|
|
76
76
|
const trimmedFromEnd = StringUtils.trimEnd(message, ['\\.']);
|
|
77
|
-
return trimmedFromEnd
|
|
77
|
+
return trimmedFromEnd
|
|
78
|
+
.replace(/&&/g, '\u0000')
|
|
79
|
+
.replace(/(\S)&/g, "$1")
|
|
80
|
+
.replace(/&(\S)/g, "$1")
|
|
81
|
+
.replace(/\u0000/g, '&');
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
84
|
export class TypeConverterFactory {
|
|
@@ -274,8 +274,14 @@ export class DocumentRenderer {
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
updatePageSize(page, pageElement) {
|
|
277
|
-
if (pageElement.offsetHeight != Math.round(page.height) || pageElement.offsetWidth != Math.round(page.width))
|
|
277
|
+
if (pageElement.offsetHeight != Math.round(page.height) || pageElement.offsetWidth != Math.round(page.width)) {
|
|
278
278
|
DomUtils.setStyleSize(pageElement.style, page);
|
|
279
|
+
if (this.viewManager.innerClientProperties.viewsSettings.isSimpleView) {
|
|
280
|
+
const paddings = this.viewManager.innerClientProperties.viewsSettings.paddings;
|
|
281
|
+
if (page.width - paddings.right <= this.viewManager.sizes.getVisibleAreaWidth(false))
|
|
282
|
+
pageElement.style.width = "100%";
|
|
283
|
+
}
|
|
284
|
+
}
|
|
279
285
|
}
|
|
280
286
|
updatePageClasses(pageElement) {
|
|
281
287
|
pageElement.className = RendererClassNames.PAGE;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommandSimpleOptions } from '../../common/commands/command-base';
|
|
2
|
+
import { BorderInfo } from '../../common/model/borders/border-info';
|
|
3
|
+
import { IRichEditControl } from '../../common/interfaces/i-rich-edit-core';
|
|
4
|
+
export declare class BorderCommandOptions extends CommandSimpleOptions<BorderInfo> {
|
|
5
|
+
forceApply: boolean;
|
|
6
|
+
constructor(control: IRichEditControl, parameter: BorderInfo, forceApply: boolean);
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CommandSimpleOptions } from '../../common/commands/command-base';
|
|
2
|
+
export class BorderCommandOptions extends CommandSimpleOptions {
|
|
3
|
+
constructor(control, parameter, forceApply) {
|
|
4
|
+
super(control, parameter);
|
|
5
|
+
this.forceApply = false;
|
|
6
|
+
this.forceApply = forceApply;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -11,6 +11,7 @@ import { CommandSimpleOptions } from '../command-base';
|
|
|
11
11
|
import { SimpleCommandState } from '../command-states';
|
|
12
12
|
import { ToggleTableCellInsideHorizontalBordersCommand, ToggleTableCellInsideVerticalBordersCommand, ToggleTableCellsBottomBorderCommand, ToggleTableCellsLeftBorderCommand, ToggleTableCellsRightBorderCommand, ToggleTableCellsTopBorderCommand } from '../tables/toggle-table-cells-border-command';
|
|
13
13
|
import { DialogParametersBase, ShowDialogCommandBase } from './show-dialog-command-base';
|
|
14
|
+
import { BorderCommandOptions } from '../../../common/commands/border-command-options';
|
|
14
15
|
export class DialogBorderShadingCommandBase extends ShowDialogCommandBase {
|
|
15
16
|
getState() {
|
|
16
17
|
const visible = this.selection.tableInfo.extendedData.numRows > 0;
|
|
@@ -68,27 +69,33 @@ export class DialogBorderShadingCommandBase extends ShowDialogCommandBase {
|
|
|
68
69
|
changed = true;
|
|
69
70
|
}
|
|
70
71
|
if (newParams.top && !newParams.top.equals(initParams.top)) {
|
|
71
|
-
|
|
72
|
+
const opts = new BorderCommandOptions(this.control, newParams.top.getBorderInfo(), true);
|
|
73
|
+
this.topBorderCommand.execute(this.control.commandManager.isPublicApiCall, opts);
|
|
72
74
|
changed = true;
|
|
73
75
|
}
|
|
74
76
|
if (newParams.bottom && !newParams.bottom.equals(initParams.bottom)) {
|
|
75
|
-
|
|
77
|
+
const opts = new BorderCommandOptions(this.control, newParams.bottom.getBorderInfo(), true);
|
|
78
|
+
this.bottomBorderCommand.execute(this.control.commandManager.isPublicApiCall, opts);
|
|
76
79
|
changed = true;
|
|
77
80
|
}
|
|
78
81
|
if (newParams.right && !newParams.right.equals(initParams.right)) {
|
|
79
|
-
|
|
82
|
+
const opts = new BorderCommandOptions(this.control, newParams.right.getBorderInfo(), true);
|
|
83
|
+
this.rightBorderCommand.execute(this.control.commandManager.isPublicApiCall, opts);
|
|
80
84
|
changed = true;
|
|
81
85
|
}
|
|
82
86
|
if (newParams.left && !newParams.left.equals(initParams.left)) {
|
|
83
|
-
|
|
87
|
+
const opts = new BorderCommandOptions(this.control, newParams.left.getBorderInfo(), true);
|
|
88
|
+
this.leftBorderCommand.execute(this.control.commandManager.isPublicApiCall, opts);
|
|
84
89
|
changed = true;
|
|
85
90
|
}
|
|
86
91
|
if (newParams.insideHorizontal && !newParams.insideHorizontal.equals(initParams.insideHorizontal)) {
|
|
87
|
-
|
|
92
|
+
const opts = new BorderCommandOptions(this.control, newParams.insideHorizontal.getBorderInfo(), true);
|
|
93
|
+
this.insideHorizontalBordersCommand.execute(this.control.commandManager.isPublicApiCall, opts);
|
|
88
94
|
changed = true;
|
|
89
95
|
}
|
|
90
96
|
if (newParams.insideVertical && !newParams.insideVertical.equals(initParams.insideVertical)) {
|
|
91
|
-
|
|
97
|
+
const opts = new BorderCommandOptions(this.control, newParams.insideVertical.getBorderInfo(), true);
|
|
98
|
+
this.insideVerticalBordersCommand.execute(this.control.commandManager.isPublicApiCall, opts);
|
|
92
99
|
changed = true;
|
|
93
100
|
}
|
|
94
101
|
history.endTransaction();
|
|
@@ -17,7 +17,7 @@ export declare abstract class ToggleTableCellsBorderCommandBase extends CommandB
|
|
|
17
17
|
static isBorderVisible(border: BorderInfo): boolean;
|
|
18
18
|
DEPRECATEDConvertOptionsParameter(parameter: any): BorderInfo;
|
|
19
19
|
protected getRelatedCommands(): Record<number, boolean>;
|
|
20
|
-
getState(
|
|
20
|
+
getState(options?: CommandSimpleOptions<BorderInfo>): SimpleCommandState;
|
|
21
21
|
isEnabled(): boolean;
|
|
22
22
|
isChecked(tableInfo: SelectedTableInfo): boolean;
|
|
23
23
|
executeCore(state: SimpleCommandState, options: CommandSimpleOptions<BorderInfo>): boolean;
|
|
@@ -10,6 +10,7 @@ import { TableCellMergingState } from '../../model/tables/secondary-structures/t
|
|
|
10
10
|
import { RichEditClientCommand } from '../client-command';
|
|
11
11
|
import { CommandBase } from '../command-base';
|
|
12
12
|
import { SimpleCommandState } from '../command-states';
|
|
13
|
+
import { BorderCommandOptions } from '../../../common/commands/border-command-options';
|
|
13
14
|
export class ToggleTableCellsBorderCommandBase extends CommandBase {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
@@ -39,12 +40,18 @@ export class ToggleTableCellsBorderCommandBase extends CommandBase {
|
|
|
39
40
|
[RichEditClientCommand.ToggleTableCellsTopBorder]: true,
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
|
-
getState(
|
|
43
|
+
getState(options = this.convertToCommandOptions(null)) {
|
|
43
44
|
const tableInfo = this.selection.tableInfo;
|
|
44
45
|
let enabled = this.isEnabled() && this.selection.tableInfo.extendedData.areCellsSelectedInSeries;
|
|
45
46
|
let state = new SimpleCommandState(enabled);
|
|
46
|
-
if (state.enabled)
|
|
47
|
-
|
|
47
|
+
if (state.enabled) {
|
|
48
|
+
if (options instanceof BorderCommandOptions && options.forceApply) {
|
|
49
|
+
state.value = !ToggleTableCellsBorderCommandBase.isBorderVisible(options.param);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
state.value = this.isChecked(tableInfo);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
48
55
|
return state;
|
|
49
56
|
}
|
|
50
57
|
isEnabled() {
|
|
@@ -54,12 +54,18 @@ export class EventManager {
|
|
|
54
54
|
clearTimeout(this.onMouseUpTimerId);
|
|
55
55
|
}
|
|
56
56
|
onShortcut(shortcutCode) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this.
|
|
57
|
+
this.control.beginUpdate();
|
|
58
|
+
try {
|
|
59
|
+
if (this.accumulatedText.length)
|
|
60
|
+
this.insertFunc();
|
|
61
|
+
this.control.shortcutManager.processShortcut(shortcutCode);
|
|
62
|
+
this.mouseHandler.onShortcut(shortcutCode);
|
|
63
|
+
if (EnumUtils.isAnyOf(shortcutCode, KeyCode.Enter, KeyCode.Tab, KeyCode.Space) && this.control.selection.lastSelectedInterval.start > 0)
|
|
64
|
+
this.control.autoCorrectService.performAutoCorrect();
|
|
65
|
+
}
|
|
66
|
+
finally {
|
|
67
|
+
this.control.endUpdate();
|
|
68
|
+
}
|
|
63
69
|
}
|
|
64
70
|
onMouseDown(evt) {
|
|
65
71
|
Log.print(LogSource.EventManager, "onMouseDown", LogObjToStrCanvas.richMouseEvent(evt));
|
|
@@ -116,7 +122,6 @@ export class EventManager {
|
|
|
116
122
|
onMouseDblClick(evt) {
|
|
117
123
|
Log.print(LogSource.EventManager, "onMouseDoubleClick", LogObjToStrCanvas.richMouseEvent(evt));
|
|
118
124
|
this.mouseHandler.onMouseDoubleClick(evt);
|
|
119
|
-
this.control.inputController.setPosition(evt.absolutePoint.x, evt.absolutePoint.y);
|
|
120
125
|
}
|
|
121
126
|
onMouseWheel(evt) {
|
|
122
127
|
Log.print(LogSource.EventManager, "onMouseWheel", LogObjToStrCanvas.richMouseEvent(evt));
|
|
@@ -208,6 +213,8 @@ export class EventManager {
|
|
|
208
213
|
this.control.modelManager.modelManipulator.notifyModelChanged(new TextBufferChangedSubDocumentChange(subDocument.id, state));
|
|
209
214
|
}
|
|
210
215
|
insertFunc() {
|
|
216
|
+
if (this.accumulatedText.length === 0)
|
|
217
|
+
return;
|
|
211
218
|
const insertCommand = this.control.commandManager.getCommand(RichEditClientCommand.InsertText);
|
|
212
219
|
const textWasInserted = insertCommand.execute(this.control.commandManager.isPublicApiCall, this.accumulatedText);
|
|
213
220
|
this.accumulatedText = "";
|
|
@@ -38,6 +38,7 @@ export declare class BaseFormatter {
|
|
|
38
38
|
private tryExcludeAnchoredObjectFromCurrentPage;
|
|
39
39
|
private shouldEndColumn;
|
|
40
40
|
private processStateColumnEnd;
|
|
41
|
+
private calculateContentWidth;
|
|
41
42
|
private createNextPageArea;
|
|
42
43
|
private createNextColumn;
|
|
43
44
|
private pushRow;
|
|
@@ -238,6 +238,7 @@ export class BaseFormatter {
|
|
|
238
238
|
this.layoutPosition.column.height = columnHeight;
|
|
239
239
|
this.layoutPosition.pageArea.height = columnHeight;
|
|
240
240
|
this.layoutPosition.page.height = finalPageHeight;
|
|
241
|
+
this.layoutPosition.page.width = this.calculateContentWidth(this.layoutPosition.column) + margins.horizontal;
|
|
241
242
|
this.layoutPosition.page.minContentHeight = minVisibleAreaHeight;
|
|
242
243
|
}
|
|
243
244
|
createdColumn.paragraphFrames = ParagraphFrameCollector.collect(this.manager.model.colorProvider, createdColumn, this.subDocument.isMain() ?
|
|
@@ -257,6 +258,16 @@ export class BaseFormatter {
|
|
|
257
258
|
}
|
|
258
259
|
return true;
|
|
259
260
|
}
|
|
261
|
+
calculateContentWidth(column) {
|
|
262
|
+
let maxRight = 0;
|
|
263
|
+
column.tablesInfo.forEach(tableInfo => {
|
|
264
|
+
maxRight = Math.max(maxRight, tableInfo.right);
|
|
265
|
+
});
|
|
266
|
+
column.rows.forEach(row => {
|
|
267
|
+
maxRight = Math.max(maxRight, row.right);
|
|
268
|
+
});
|
|
269
|
+
return maxRight;
|
|
270
|
+
}
|
|
260
271
|
createNextPageArea() {
|
|
261
272
|
const newPageArea = new LayoutPageArea(this.subDocument);
|
|
262
273
|
newPageArea.setGeomerty(this.pageAreaBounds);
|
|
@@ -25,7 +25,7 @@ export declare class RowFormatterResult {
|
|
|
25
25
|
finishLogicalRow(currLogicRowEndPos: number): void;
|
|
26
26
|
private deleteSomeAnchorObjects;
|
|
27
27
|
finishRow(): void;
|
|
28
|
-
private
|
|
28
|
+
private getLastVisibleBox;
|
|
29
29
|
private addBracketBox;
|
|
30
30
|
private addBrackets;
|
|
31
31
|
private getBracketBox;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Flag } from '@devexpress/utils/lib/class/flag';
|
|
2
|
-
import { EnumUtils } from '@devexpress/utils/lib/utils/enum';
|
|
3
2
|
import { ListUtils } from '@devexpress/utils/lib/utils/list';
|
|
4
3
|
import { MathUtils } from '@devexpress/utils/lib/utils/math';
|
|
5
4
|
import { SearchUtils } from '@devexpress/utils/lib/utils/search';
|
|
6
5
|
import { DocumentLayoutDetailsLevel } from '../../layout/document-layout-details-level';
|
|
7
6
|
import { BookmarkBox, LayoutBookmarkBoxType } from '../../layout/main-structures/layout-boxes/bookmark-box';
|
|
8
7
|
import { AnchoredObjectLevelType } from '../../layout/main-structures/layout-boxes/layout-anchored-object-box';
|
|
9
|
-
import { LayoutBoxType } from '../../layout/main-structures/layout-boxes/layout-box';
|
|
10
8
|
import { LayoutRow, LayoutRowStateFlags } from '../../layout/main-structures/layout-row';
|
|
11
9
|
import { BoxAligner } from './utils/box-aligner';
|
|
12
10
|
export var RowFormatterResultFlag;
|
|
@@ -52,7 +50,8 @@ export class RowFormatterResult {
|
|
|
52
50
|
}
|
|
53
51
|
finishRow() {
|
|
54
52
|
this.finishLogicalRow(this.rowFormatter.rowSizesManager.rowFormattingInfo.lastNonEmptyInterval.end);
|
|
55
|
-
const
|
|
53
|
+
const lastBox = ListUtils.last(this.row.boxes);
|
|
54
|
+
const lastBoxOffset = lastBox.rowOffset;
|
|
56
55
|
for (let ind = 0, anc; anc = this.newAnchoredObjects[ind]; ind++) {
|
|
57
56
|
if (anc.rowOffset > lastBoxOffset) {
|
|
58
57
|
this.deleteSomeAnchorObjects(ind, anc.rowOffset);
|
|
@@ -81,24 +80,20 @@ export class RowFormatterResult {
|
|
|
81
80
|
}
|
|
82
81
|
this.row.columnOffset = rowStartPos -
|
|
83
82
|
this.rowFormatter.manager.activeFormatter.layoutPosition.getLogPosition(DocumentLayoutDetailsLevel.Column);
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
const firstBox = this.row.boxes[0];
|
|
84
|
+
const lastVisibleBox = this.getLastVisibleBox();
|
|
85
|
+
if (lastVisibleBox)
|
|
86
|
+
this.row.width = Math.max(this.row.width, lastVisibleBox.right - firstBox.x);
|
|
87
87
|
const currState = this.rowFormatter.rowSizesManager.heightCalculator.currState;
|
|
88
88
|
this.row.increaseRowHeightFromSpacingBeforeAndAfter(currState.maxAscent, currState.maxDescent);
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
pictBox = box;
|
|
96
|
-
}
|
|
97
|
-
else if (!EnumUtils.isAnyOf(box.getType(), LayoutBoxType.ParagraphMark, LayoutBoxType.SectionMark, LayoutBoxType.LineBreak, LayoutBoxType.PageBreak)) {
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
90
|
+
getLastVisibleBox() {
|
|
91
|
+
for (let i = this.row.boxes.length - 1; i >= 0; i--) {
|
|
92
|
+
const box = this.row.boxes[i];
|
|
93
|
+
if (box.isVisible() && !box.isWhitespace())
|
|
94
|
+
return box;
|
|
100
95
|
}
|
|
101
|
-
return
|
|
96
|
+
return null;
|
|
102
97
|
}
|
|
103
98
|
addBracketBox(boxType, color, x, layoutBox) {
|
|
104
99
|
const box = new BookmarkBox(boxType);
|
|
@@ -4,7 +4,8 @@ import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
|
|
|
4
4
|
export declare class RowIntervalInfo extends FixedInterval {
|
|
5
5
|
avaliableWidth: number;
|
|
6
6
|
constructor(start: number, length: number, avaliableWidth?: number);
|
|
7
|
-
get
|
|
7
|
+
get rawUsedWidth(): number;
|
|
8
|
+
get usedWidth(): number;
|
|
8
9
|
get startOfFreeSpace(): number;
|
|
9
10
|
isConsiderBoxes(): boolean;
|
|
10
11
|
}
|
|
@@ -11,11 +11,14 @@ export class RowIntervalInfo extends FixedInterval {
|
|
|
11
11
|
super(start, length);
|
|
12
12
|
this.avaliableWidth = avaliableWidth;
|
|
13
13
|
}
|
|
14
|
-
get
|
|
14
|
+
get rawUsedWidth() {
|
|
15
15
|
return this.length - this.avaliableWidth;
|
|
16
16
|
}
|
|
17
|
+
get usedWidth() {
|
|
18
|
+
return Math.min(this.rawUsedWidth, this.length);
|
|
19
|
+
}
|
|
17
20
|
get startOfFreeSpace() {
|
|
18
|
-
return this.start + this.
|
|
21
|
+
return this.start + this.rawUsedWidth;
|
|
19
22
|
}
|
|
20
23
|
isConsiderBoxes() {
|
|
21
24
|
return this.avaliableWidth != this.length;
|
|
@@ -71,7 +74,7 @@ export class RowFormattingInfo {
|
|
|
71
74
|
recalculate(outerHorizontalRowContentBounds) {
|
|
72
75
|
const currInterval = this.currInterval;
|
|
73
76
|
this.calculate(outerHorizontalRowContentBounds);
|
|
74
|
-
const pos = currInterval.start + currInterval.
|
|
77
|
+
const pos = currInterval.start + currInterval.rawUsedWidth;
|
|
75
78
|
const index = this.findIntervalIndexByPosition(pos);
|
|
76
79
|
const interval = this.intervals[index];
|
|
77
80
|
if (interval && interval.start < pos) {
|
|
@@ -91,7 +94,7 @@ export class RowFormattingInfo {
|
|
|
91
94
|
return index;
|
|
92
95
|
}
|
|
93
96
|
canIncrementHeightTo(newHeight) {
|
|
94
|
-
const contentBounds = ListUtils.map(this.intervals, (c) => new Rectangle(c.start, this.minY, c.
|
|
97
|
+
const contentBounds = ListUtils.map(this.intervals, (c) => new Rectangle(c.start, this.minY, c.usedWidth, newHeight));
|
|
95
98
|
const intersectedObjects = this.calcIntersectObjects(newHeight);
|
|
96
99
|
return !ListUtils.unsafeAnyOf(intersectedObjects, (ancBound) => ListUtils.unsafeAnyOf(contentBounds, (contentBound) => RectangleUtils.getNonCollapsedIntersection(contentBound, ancBound)));
|
|
97
100
|
}
|
|
@@ -129,7 +129,7 @@ export class RowSizesManager {
|
|
|
129
129
|
}
|
|
130
130
|
else {
|
|
131
131
|
box.x = this.rowFormattingInfo.intervals[0].startOfFreeSpace;
|
|
132
|
-
this.rowFormattingInfo.intervals[0].avaliableWidth -=
|
|
132
|
+
this.rowFormattingInfo.intervals[0].avaliableWidth -= box.width;
|
|
133
133
|
this.addBoxIgnoreWidth();
|
|
134
134
|
}
|
|
135
135
|
}
|
|
@@ -166,8 +166,6 @@ export class RowSizesManager {
|
|
|
166
166
|
const box = this.rowFormatter.currBox;
|
|
167
167
|
box.x = this.rowFormattingInfo.currInterval.startOfFreeSpace;
|
|
168
168
|
this.rowFormattingInfo.currInterval.avaliableWidth -= box.width;
|
|
169
|
-
if (this.rowFormattingInfo.currInterval.avaliableWidth < 0)
|
|
170
|
-
this.rowFormattingInfo.currInterval.avaliableWidth = 0;
|
|
171
169
|
this.row.boxes.push(box);
|
|
172
170
|
this.rowFormattingInfo.lastNonEmptyIntervalIndex = this.rowFormattingInfo.currIndex;
|
|
173
171
|
this.rowFormatter.setBoxInfo(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devexpress-richedit",
|
|
3
|
-
"version": "25.2.
|
|
3
|
+
"version": "25.2.8",
|
|
4
4
|
"homepage": "https://www.devexpress.com/",
|
|
5
5
|
"bugs": "https://www.devexpress.com/support/",
|
|
6
6
|
"author": "Developer Express Inc.",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"build-nspell": "webpack --mode production --config=bin/nspell.webpack.config.js"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"devextreme": "25.2.
|
|
15
|
-
"devextreme-dist": "25.2.
|
|
14
|
+
"devextreme": "25.2.8",
|
|
15
|
+
"devextreme-dist": "25.2.8"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"dictionary-en": "3.2.0",
|