devexpress-richedit 24.1.12-build-25093-0104 → 24.1.12-build-25107-0103
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/dist/dx.richedit.js +102 -76
- package/dist/dx.richedit.min.js +1 -1
- package/lib/client/public/rich-edit.js +2 -2
- package/lib/common/canvas/canvas-manager.js +10 -4
- package/lib/common/canvas/renderes/common/document-renderer.js +10 -12
- package/lib/common/input-controller.d.ts +5 -5
- package/lib/common/input-controller.js +12 -12
- package/lib/common/layout-formatter/row/tab-info.js +1 -1
- package/lib/common/mouse-handler/mouse-handler/mouse-handler-default-state.d.ts +1 -1
- package/lib/common/mouse-handler/mouse-handler/mouse-handler-default-state.js +22 -25
- package/lib/common/rich-edit-core.js +2 -2
- package/lib/common/utils/size-utils.d.ts +14 -7
- package/lib/common/utils/size-utils.js +43 -18
- package/package.json +3 -3
@@ -158,11 +158,11 @@ class RichEditPublic {
|
|
158
158
|
command.execute(true, type);
|
159
159
|
}
|
160
160
|
get readOnly() {
|
161
|
-
return this._native.core.readOnly
|
161
|
+
return this._native.core.readOnly === ReadOnlyMode.Persistent;
|
162
162
|
}
|
163
163
|
set readOnly(value) {
|
164
164
|
if (this.readOnly != value) {
|
165
|
-
this._native.core.
|
165
|
+
this._native.core.setPersistentReadOnly(value);
|
166
166
|
this._native.core.barHolder.updateItemsState();
|
167
167
|
this._native.core.horizontalRulerControl.update();
|
168
168
|
this._native.core.beginUpdate();
|
@@ -318,17 +318,23 @@ export class CanvasManager extends BatchUpdatableObject {
|
|
318
318
|
onScrollIntervalTick() {
|
319
319
|
const evtX = this.lastMousePosition.x;
|
320
320
|
const evtY = this.lastMousePosition.y;
|
321
|
-
const inHorizontalArea = evtX >= this.canvasPosition.x && evtX <= this.canvasPosition.x + this.sizes.getVisibleAreaWidth(
|
322
|
-
const inVerticalArea = evtY >= this.canvasPosition.y && evtY <= this.canvasPosition.y + this.sizes.getVisibleAreaHeight(
|
321
|
+
const inHorizontalArea = evtX >= this.canvasPosition.x && evtX <= this.canvasPosition.x + this.sizes.getVisibleAreaWidth(false);
|
322
|
+
const inVerticalArea = evtY >= this.canvasPosition.y && evtY <= this.canvasPosition.y + this.sizes.getVisibleAreaHeight(false);
|
323
323
|
if (!inHorizontalArea && !inVerticalArea)
|
324
324
|
return;
|
325
|
+
const yOffsetWithoutScrollbar = this.canvasPosition.y + this.sizes.getVisibleAreaHeight(false) - evtY;
|
326
|
+
const yOffsetWithScrollbar = this.canvasPosition.y + this.sizes.getVisibleAreaHeight(true) - evtY;
|
327
|
+
const outsideHorizontalScrollbar = yOffsetWithoutScrollbar > 0 || yOffsetWithScrollbar < 0;
|
325
328
|
if (inHorizontalArea && evtY - this.canvasPosition.y <= AUTOSCROLL_AREA_SIZE)
|
326
329
|
this.viewManager.canvas.scrollTop -= AUTOSCROLL_STEP;
|
327
|
-
else if (inHorizontalArea &&
|
330
|
+
else if (inHorizontalArea && yOffsetWithoutScrollbar <= AUTOSCROLL_AREA_SIZE && outsideHorizontalScrollbar)
|
328
331
|
this.viewManager.canvas.scrollTop += AUTOSCROLL_STEP;
|
332
|
+
const xOffsetWithoutScrollbar = this.canvasPosition.x + this.sizes.getVisibleAreaWidth(false) - evtX;
|
333
|
+
const xOffsetWithScrollbar = this.canvasPosition.x + this.sizes.getVisibleAreaWidth(true) - evtX;
|
334
|
+
const outsideVerticalScrollbar = xOffsetWithoutScrollbar > 0 || xOffsetWithScrollbar < 0;
|
329
335
|
if (inVerticalArea && evtX - this.canvasPosition.x <= AUTOSCROLL_AREA_SIZE)
|
330
336
|
this.viewManager.canvas.scrollLeft -= AUTOSCROLL_STEP;
|
331
|
-
else if (inVerticalArea &&
|
337
|
+
else if (inVerticalArea && xOffsetWithoutScrollbar <= AUTOSCROLL_AREA_SIZE && outsideVerticalScrollbar)
|
332
338
|
this.viewManager.canvas.scrollLeft += AUTOSCROLL_STEP;
|
333
339
|
}
|
334
340
|
static getCursorClassName(pointer) {
|
@@ -77,18 +77,16 @@ export class SimpleViewCanvasSizeManager {
|
|
77
77
|
this.sizeUpdated = true;
|
78
78
|
}
|
79
79
|
changeSizeCore() {
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
this.control.selection.
|
87
|
-
.setModelPosition(this.control.selection.lastSelectedInterval.start).useStdRelativePosition().useStdOffset());
|
88
|
-
}
|
89
|
-
this.control.owner.adjustControl();
|
90
|
-
this.control.horizontalRulerControl.update();
|
80
|
+
ListUtils.forEach(this.control.viewManager.cache, (_val) => this.control.viewManager.renderer.removePage(1), 1);
|
81
|
+
this.control.viewManager.ensureFirstPageIsRendered();
|
82
|
+
this.control.innerClientProperties.viewsSettings.widthOfPage = this.canvasManager.getCanvasWidth();
|
83
|
+
if (this.control.layoutFormatterManager) {
|
84
|
+
this.control.layoutFormatterManager.invalidator.onChangedAllLayout();
|
85
|
+
this.control.selection.scrollManager.setScroll(new ScrollState().byModelPosition(this.control.selection)
|
86
|
+
.setModelPosition(this.control.selection.lastSelectedInterval.start).useStdRelativePosition().useStdOffset());
|
91
87
|
}
|
88
|
+
this.control.owner.adjustControl();
|
89
|
+
this.control.horizontalRulerControl.update();
|
92
90
|
}
|
93
91
|
}
|
94
92
|
export class DocumentRenderer {
|
@@ -272,7 +270,7 @@ export class DocumentRenderer {
|
|
272
270
|
}
|
273
271
|
}
|
274
272
|
updatePageSize(page, pageElement) {
|
275
|
-
if (pageElement.offsetHeight != page.height || pageElement.offsetWidth != page.width)
|
273
|
+
if (pageElement.offsetHeight != Math.round(page.height) || pageElement.offsetWidth != Math.round(page.width))
|
276
274
|
DomUtils.setStyleSize(pageElement.style, page);
|
277
275
|
}
|
278
276
|
updatePageClasses(pageElement) {
|
@@ -17,7 +17,7 @@ export declare abstract class InputEditorBase<TInpElement extends HTMLElement> {
|
|
17
17
|
previousText: string;
|
18
18
|
canInsertTextOnInputEvent: boolean;
|
19
19
|
needProcessShortcut: boolean;
|
20
|
-
|
20
|
+
editableStateInitialized: boolean;
|
21
21
|
prevKeyCode: number;
|
22
22
|
IMEState: IMEState;
|
23
23
|
private inputWithAlt;
|
@@ -31,8 +31,8 @@ export declare abstract class InputEditorBase<TInpElement extends HTMLElement> {
|
|
31
31
|
constructor(control: IRichEditControl, eventManager: IEventManager, parent: HTMLElement);
|
32
32
|
dispose(): void;
|
33
33
|
initialize(): void;
|
34
|
-
|
35
|
-
|
34
|
+
initializeEditableState(): void;
|
35
|
+
initializeEditableStateCore(): void;
|
36
36
|
initEvents(): void;
|
37
37
|
createHierarchy(parent: HTMLElement): void;
|
38
38
|
createHierarchyCore(): void;
|
@@ -78,7 +78,7 @@ export declare class DivInputEditor extends InputEditorBase<HTMLElement> {
|
|
78
78
|
private onTextInputTimerId;
|
79
79
|
constructor(control: IRichEditControl, eventManager: IEventManager, parent: HTMLElement);
|
80
80
|
dispose(): void;
|
81
|
-
|
81
|
+
initializeEditableStateCore(): void;
|
82
82
|
setPosition(left: number, top: number): void;
|
83
83
|
createInputElement(): HTMLElement;
|
84
84
|
initEvents(): void;
|
@@ -114,7 +114,7 @@ export declare class IFrameInputEditor extends InputEditorBase<HTMLIFrameElement
|
|
114
114
|
constructor(control: IRichEditControl, eventManager: IEventManager, parent: HTMLElement);
|
115
115
|
dispose(): void;
|
116
116
|
createHierarchyCore(): void;
|
117
|
-
|
117
|
+
initializeEditableStateCore(): void;
|
118
118
|
createInputElement(): HTMLIFrameElement;
|
119
119
|
initEvents(): void;
|
120
120
|
private isModifyEnabled;
|
@@ -51,17 +51,17 @@ export class InputEditorBase {
|
|
51
51
|
clearTimeout(this.onKeyUpTimerId);
|
52
52
|
}
|
53
53
|
initialize() {
|
54
|
-
this.
|
54
|
+
this.initializeEditableState();
|
55
55
|
this.initEvents();
|
56
56
|
this.prevKeyCode = EMPTY_KEYCODE;
|
57
57
|
}
|
58
|
-
|
59
|
-
if (
|
60
|
-
this.
|
61
|
-
this.
|
58
|
+
initializeEditableState() {
|
59
|
+
if (!this.editableStateInitialized) {
|
60
|
+
this.editableStateInitialized = true;
|
61
|
+
this.initializeEditableStateCore();
|
62
62
|
}
|
63
63
|
}
|
64
|
-
|
64
|
+
initializeEditableStateCore() {
|
65
65
|
}
|
66
66
|
initEvents() {
|
67
67
|
this.evtHandlersHolder.addListener(this.getEditableDocument(), "keydown", this.onKeyDown.bind(this));
|
@@ -281,8 +281,8 @@ export class DivInputEditor extends InputEditorBase {
|
|
281
281
|
clearTimeout(this.composEndTimerId);
|
282
282
|
clearTimeout(this.onTextInputTimerId);
|
283
283
|
}
|
284
|
-
|
285
|
-
this.inputElement.contentEditable =
|
284
|
+
initializeEditableStateCore() {
|
285
|
+
this.inputElement.contentEditable = String(!this.control.isReadOnlyPersistent);
|
286
286
|
this.clearInputElement();
|
287
287
|
}
|
288
288
|
setPosition(left, top) {
|
@@ -530,11 +530,11 @@ export class IFrameInputEditor extends InputEditorBase {
|
|
530
530
|
body.style.margin = "0px";
|
531
531
|
body.style.overflow = "hidden";
|
532
532
|
}
|
533
|
-
|
533
|
+
initializeEditableStateCore() {
|
534
534
|
if (Browser.WebKitFamily)
|
535
|
-
this.editableDocument.body.setAttribute("contenteditable",
|
535
|
+
this.editableDocument.body.setAttribute("contenteditable", String(!this.control.isReadOnlyPersistent));
|
536
536
|
else
|
537
|
-
this.editableDocument.designMode = "on";
|
537
|
+
this.editableDocument.designMode = this.control.isReadOnlyPersistent ? "off" : "on";
|
538
538
|
}
|
539
539
|
createInputElement() {
|
540
540
|
const element = document.createElement("IFRAME");
|
@@ -673,7 +673,7 @@ export class IFrameInputEditor extends InputEditorBase {
|
|
673
673
|
recreateIfNeeded() {
|
674
674
|
const iframeDocument = this.inputElement.contentDocument || this.inputElement.contentWindow.document;
|
675
675
|
if (!iframeDocument.body.hasAttribute("loaded")) {
|
676
|
-
this.
|
676
|
+
this.editableStateInitialized = false;
|
677
677
|
this.createHierarchyCore();
|
678
678
|
this.initialize();
|
679
679
|
}
|
@@ -85,7 +85,7 @@ export class RowTabInfo {
|
|
85
85
|
const lastInterval = ListUtils.last(this.rowFormatter.rowSizesManager.rowFormattingInfo.intervals);
|
86
86
|
if (tabXPosRelativePage > lastInterval.end) {
|
87
87
|
if (lastInterval.end < this.rowFormatter.paragraphHorizontalBounds.end) {
|
88
|
-
if (this.rowFormatter.manager.model.compatibilitySettings.compatibilityMode < CompatibilityMode.Word2013) {
|
88
|
+
if (this.rowFormatter.manager.model.compatibilitySettings.compatibilityMode < CompatibilityMode.Word2013 && tabPosition !== null) {
|
89
89
|
this.currInterval.avaliableWidth = Number.MAX_SAFE_INTEGER - this.currInterval.busyWidth;
|
90
90
|
this.currInterval.length = Number.MAX_SAFE_INTEGER;
|
91
91
|
this.row.width = Number.MAX_SAFE_INTEGER;
|
@@ -32,7 +32,7 @@ export declare class MouseHandlerDefaultState extends MouseHandlerStateBase {
|
|
32
32
|
private shouldBeginDragExistingSelection;
|
33
33
|
private selectImage;
|
34
34
|
private beginDragExistingSelection;
|
35
|
-
selectFloatingObject(box: LayoutAnchoredObjectBox):
|
35
|
+
selectFloatingObject(box: LayoutAnchoredObjectBox): boolean;
|
36
36
|
}
|
37
37
|
export declare class MouseHandlerHelper {
|
38
38
|
static selectParentsTextBox(control: IRichEditControl): void;
|
@@ -168,40 +168,31 @@ export class MouseHandlerDefaultState extends MouseHandlerStateBase {
|
|
168
168
|
this.processMouseDownOnMaxDetailsLevel(evt, htr, activeSubDocument);
|
169
169
|
}
|
170
170
|
processMouseDownOnMaxDetailsLevel(evt, htr, activeSubDocument) {
|
171
|
+
const selection = this.handler.control.selection;
|
171
172
|
if (htr.floatingObject) {
|
172
|
-
if (htr.floatingObject.belongsToSubDocId != this.handler.control.selection.activeSubDocument.id)
|
173
|
-
MouseHandlerHelper.changeActiveSubDocumentToParent(this.handler.control);
|
174
173
|
const box = htr.floatingObject;
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
if (
|
179
|
-
HitTestManager.isPointInTexBoxArea(evt.layoutPoint, box, activeSubDocument.isTextBox() ? 0 : box.rotationInRadians)) {
|
174
|
+
const rotationAngle = activeSubDocument.isTextBox() ? 0 : box.rotationInRadians;
|
175
|
+
if (box.getType() == LayoutBoxType.AnchorTextBox && HitTestManager.isPointInTexBoxArea(evt.layoutPoint, box, rotationAngle)) {
|
176
|
+
const textbox = box;
|
177
|
+
if (textbox.internalSubDocId !== selection.activeSubDocument.id && this.selectFloatingObject(box)) {
|
180
178
|
this.handler.control.commandManager.getCommand(RichEditClientCommand.ChangeActiveSubDocumentToTextBox).execute(this.handler.control.commandManager.isPublicApiCall);
|
181
179
|
this.handler.boxVisualizerManager.resizeBoxVisualizer.show(htr.pageIndex, null, null, null, box);
|
182
|
-
htr = this.handler.control.hitTestManager.calculate(evt.layoutPoint, DocumentLayoutDetailsLevel.Max,
|
183
|
-
}
|
184
|
-
else {
|
185
|
-
if (this.resizeRotationChecker(() => {
|
186
|
-
const dragFloatingObjectState = new MouseHandlerDragFloatingObjectState(this.handler, evt);
|
187
|
-
this.handler.switchState(new MouseHandlerBeginDragHelperState(evt.layoutPoint, this.handler, dragFloatingObjectState));
|
188
|
-
}))
|
189
|
-
return;
|
190
|
-
else {
|
191
|
-
if (specRunInfo.isPictureSelected()) {
|
192
|
-
this.handler.control.selection.setSelection(new SetSelectionParams()
|
193
|
-
.setInterval(new FixedInterval(specRunInfo.getPicturePosition(), 1)));
|
194
|
-
return;
|
195
|
-
}
|
196
|
-
}
|
180
|
+
htr = this.handler.control.hitTestManager.calculate(evt.layoutPoint, DocumentLayoutDetailsLevel.Max, selection.activeSubDocument);
|
197
181
|
}
|
198
182
|
}
|
183
|
+
else {
|
184
|
+
if (this.selectFloatingObject(box) && this.resizeRotationChecker(() => {
|
185
|
+
const dragFloatingObjectState = new MouseHandlerDragFloatingObjectState(this.handler, evt);
|
186
|
+
this.handler.switchState(new MouseHandlerBeginDragHelperState(evt.layoutPoint, this.handler, dragFloatingObjectState));
|
187
|
+
}))
|
188
|
+
return;
|
189
|
+
}
|
199
190
|
}
|
200
191
|
if (Browser.TouchUI && htr.subDocument.isMain() && htr.exactlyDetailLevel < DocumentLayoutDetailsLevel.PageArea) {
|
201
192
|
if (htr.deviations[DocumentLayoutDetailsLevel.PageArea] & HitTestDeviation.Top || htr.deviations[DocumentLayoutDetailsLevel.PageArea] & HitTestDeviation.Bottom)
|
202
193
|
this.handler.control.viewManager.canvasScrollManager.waitForDblClick();
|
203
194
|
}
|
204
|
-
if (evt.button === MouseButton.Right &&
|
195
|
+
if (evt.button === MouseButton.Right && selection.lastSelectedInterval.contains(htr.getPosition()))
|
205
196
|
return;
|
206
197
|
if (this.shouldSelectEntireTableColumn(htr))
|
207
198
|
this.beginSelectEntireTableColumn(htr, evt);
|
@@ -216,7 +207,7 @@ export class MouseHandlerDefaultState extends MouseHandlerStateBase {
|
|
216
207
|
this.beginSelectEntireTableCell(htr, evt);
|
217
208
|
}
|
218
209
|
else if (this.isLeftArea(htr, evt)) {
|
219
|
-
if (evt.modifiers & ModifierKey.Ctrl &&
|
210
|
+
if (evt.modifiers & ModifierKey.Ctrl && selection.isCollapsed())
|
220
211
|
this.handler.control.commandManager.getCommand(RichEditClientCommand.SelectAll).execute(this.handler.control.commandManager.isPublicApiCall, htr.getPosition());
|
221
212
|
else if (this.isLeftAreaOffset(htr, evt))
|
222
213
|
this.beginLineSelection(htr, evt);
|
@@ -424,8 +415,14 @@ export class MouseHandlerDefaultState extends MouseHandlerStateBase {
|
|
424
415
|
this.handler.switchState(state);
|
425
416
|
}
|
426
417
|
selectFloatingObject(box) {
|
418
|
+
const selection = this.handler.control.selection;
|
419
|
+
if (box.belongsToSubDocId !== selection.activeSubDocument.id)
|
420
|
+
MouseHandlerHelper.changeActiveSubDocumentToParent(this.handler.control);
|
421
|
+
if (box.belongsToSubDocId !== selection.activeSubDocument.id)
|
422
|
+
return false;
|
427
423
|
const pos = this.handler.control.layout.anchorObjectsPositionInfo.getPosition(box.objectId);
|
428
|
-
|
424
|
+
selection.setSelection(new SetSelectionParams().setInterval(new FixedInterval(pos, 1)));
|
425
|
+
return selection.specialRunInfo.isSelectedAnchorObject;
|
429
426
|
}
|
430
427
|
}
|
431
428
|
export class MouseHandlerHelper {
|
@@ -93,7 +93,7 @@ export class RichEditCore {
|
|
93
93
|
this.invalidateLayoutAfterFontsLoaded();
|
94
94
|
});
|
95
95
|
}
|
96
|
-
get isReadOnlyPersistent() { return this.readOnly
|
96
|
+
get isReadOnlyPersistent() { return this.readOnly === ReadOnlyMode.Persistent; }
|
97
97
|
get model() { return this.modelManager.model; }
|
98
98
|
get isDisposed() {
|
99
99
|
return this._isDisposed;
|
@@ -257,8 +257,8 @@ export class RichEditCore {
|
|
257
257
|
this.readOnly = ReadOnlyMode.Persistent;
|
258
258
|
else if (!readOnly && this.readOnly === ReadOnlyMode.Persistent) {
|
259
259
|
this.readOnly = ReadOnlyMode.None;
|
260
|
-
this.inputController.inputEditor.initializeIfNotReadOnly();
|
261
260
|
}
|
261
|
+
this.inputController.inputEditor.initializeEditableStateCore();
|
262
262
|
}
|
263
263
|
setWorkSession(sessionGuid, documentInfo) {
|
264
264
|
this.sessionGuid = sessionGuid;
|
@@ -1,11 +1,17 @@
|
|
1
|
+
declare type ScrollbarsWidth = {
|
2
|
+
horizontal: number;
|
3
|
+
vertical: number;
|
4
|
+
};
|
1
5
|
export declare class SizeUtils {
|
2
|
-
static
|
3
|
-
static
|
4
|
-
static
|
5
|
-
static
|
6
|
-
static
|
7
|
-
static
|
8
|
-
static
|
6
|
+
private static _scrollbarsWidth;
|
7
|
+
static getScrollbarsWidth(): ScrollbarsWidth;
|
8
|
+
static getWidthInfo(element: HTMLElement): DimensionInfo;
|
9
|
+
static getClientWidth(element: HTMLElement): number;
|
10
|
+
static getHeightInfo(element: HTMLElement): DimensionInfo;
|
11
|
+
static getClientHeight(element: HTMLElement): number;
|
12
|
+
static getOffsetSize(element: HTMLElement): DOMRect;
|
13
|
+
static getOffsetWidth(element: HTMLElement): number;
|
14
|
+
static getOffsetHeight(element: HTMLElement): number;
|
9
15
|
}
|
10
16
|
export declare class DimensionInfo {
|
11
17
|
readonly offsetSize: number;
|
@@ -13,3 +19,4 @@ export declare class DimensionInfo {
|
|
13
19
|
readonly scrollbarSize: number;
|
14
20
|
constructor(offsetSize: number, clientSize: number, scrollbarSize: number);
|
15
21
|
}
|
22
|
+
export {};
|
@@ -1,28 +1,53 @@
|
|
1
|
+
import { isDefined } from "@devexpress/utils/lib/utils/common";
|
1
2
|
export class SizeUtils {
|
3
|
+
static getScrollbarsWidth() {
|
4
|
+
if (!isDefined(this._scrollbarsWidth)) {
|
5
|
+
const scrollDiv = document.createElement('div');
|
6
|
+
scrollDiv.style.visibility = 'hidden';
|
7
|
+
scrollDiv.style.overflow = 'scroll';
|
8
|
+
scrollDiv.style.position = 'absolute';
|
9
|
+
scrollDiv.style.top = '-9999px';
|
10
|
+
scrollDiv.style.width = '100px';
|
11
|
+
scrollDiv.style.height = '100px';
|
12
|
+
document.body.appendChild(scrollDiv);
|
13
|
+
const innerDiv = document.createElement('div');
|
14
|
+
innerDiv.style.width = '100%';
|
15
|
+
innerDiv.style.height = '100%';
|
16
|
+
scrollDiv.appendChild(innerDiv);
|
17
|
+
this._scrollbarsWidth = {
|
18
|
+
horizontal: SizeUtils.getOffsetHeight(scrollDiv) - SizeUtils.getOffsetHeight(innerDiv),
|
19
|
+
vertical: SizeUtils.getOffsetWidth(scrollDiv) - SizeUtils.getOffsetWidth(innerDiv)
|
20
|
+
};
|
21
|
+
scrollDiv.remove();
|
22
|
+
}
|
23
|
+
return this._scrollbarsWidth;
|
24
|
+
}
|
2
25
|
static getWidthInfo(element) {
|
3
|
-
const
|
4
|
-
const
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
26
|
+
const computedStyle = getComputedStyle(element);
|
27
|
+
const offsetWidth = this.getOffsetWidth(element);
|
28
|
+
const offsetWidthWithoutBorder = offsetWidth
|
29
|
+
- parseCssValue(computedStyle.borderLeftWidth)
|
30
|
+
- parseCssValue(computedStyle.borderRightWidth);
|
31
|
+
let scrollbarWidth = 0;
|
32
|
+
if (Math.round(offsetWidthWithoutBorder) > element.clientWidth)
|
33
|
+
scrollbarWidth = SizeUtils.getScrollbarsWidth().vertical;
|
34
|
+
const clientWidth = offsetWidthWithoutBorder - scrollbarWidth;
|
35
|
+
return new DimensionInfo(offsetWidth, clientWidth, scrollbarWidth);
|
12
36
|
}
|
13
37
|
static getClientWidth(element) {
|
14
38
|
return this.getWidthInfo(element).clientSize;
|
15
39
|
}
|
16
40
|
static getHeightInfo(element) {
|
17
|
-
const
|
18
|
-
const
|
19
|
-
const
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
41
|
+
const computedStyle = getComputedStyle(element);
|
42
|
+
const offsetHeight = this.getOffsetHeight(element);
|
43
|
+
const offsetHeightWithoutBorder = offsetHeight
|
44
|
+
- parseCssValue(computedStyle.borderTopWidth)
|
45
|
+
- parseCssValue(computedStyle.borderBottomWidth);
|
46
|
+
let scrollbarWidth = 0;
|
47
|
+
if (Math.round(offsetHeightWithoutBorder) > element.clientHeight)
|
48
|
+
scrollbarWidth = SizeUtils.getScrollbarsWidth().horizontal;
|
49
|
+
const clientHeight = offsetHeightWithoutBorder - scrollbarWidth;
|
50
|
+
return new DimensionInfo(offsetHeight, clientHeight, scrollbarWidth);
|
26
51
|
}
|
27
52
|
static getClientHeight(element) {
|
28
53
|
return this.getHeightInfo(element).clientSize;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "devexpress-richedit",
|
3
|
-
"version": "24.1.12-build-
|
3
|
+
"version": "24.1.12-build-25107-0103",
|
4
4
|
"homepage": "https://www.devexpress.com/",
|
5
5
|
"bugs": "https://www.devexpress.com/support/",
|
6
6
|
"author": "Developer Express Inc.",
|
@@ -14,8 +14,8 @@
|
|
14
14
|
"build-nspell": "webpack --mode production --config=bin/nspell.webpack.config.js"
|
15
15
|
},
|
16
16
|
"peerDependencies": {
|
17
|
-
"devextreme": "24.1.12-build-
|
18
|
-
"devextreme-dist": "24.1.12-build-
|
17
|
+
"devextreme": "24.1.12-build-25105-1937",
|
18
|
+
"devextreme-dist": "24.1.12-build-25105-1937"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"jszip": "~3.10.1",
|