devexpress-richedit 24.2.7-build-25093-0104 → 24.2.7-build-25100-0108
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.
@@ -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) {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
export declare class SizeUtils {
|
2
|
-
static getWidthInfo(element:
|
3
|
-
static getClientWidth(element:
|
4
|
-
static getHeightInfo(element:
|
5
|
-
static getClientHeight(element:
|
6
|
-
static getOffsetSize(element:
|
7
|
-
static getOffsetWidth(element:
|
8
|
-
static getOffsetHeight(element:
|
2
|
+
static getWidthInfo(element: HTMLElement): DimensionInfo;
|
3
|
+
static getClientWidth(element: HTMLElement): number;
|
4
|
+
static getHeightInfo(element: HTMLElement): DimensionInfo;
|
5
|
+
static getClientHeight(element: HTMLElement): number;
|
6
|
+
static getOffsetSize(element: HTMLElement): DOMRect;
|
7
|
+
static getOffsetWidth(element: HTMLElement): number;
|
8
|
+
static getOffsetHeight(element: HTMLElement): number;
|
9
9
|
}
|
10
10
|
export declare class DimensionInfo {
|
11
11
|
readonly offsetSize: number;
|
@@ -1,28 +1,26 @@
|
|
1
1
|
export class SizeUtils {
|
2
2
|
static getWidthInfo(element) {
|
3
|
-
const
|
4
|
-
const
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
const
|
10
|
-
|
11
|
-
return new DimensionInfo(offsetSize, sizeWithScrollBar - scrollBarSize, scrollBarSize);
|
3
|
+
const computedStyle = getComputedStyle(element);
|
4
|
+
const offsetWidth = this.getOffsetWidth(element);
|
5
|
+
const offsetWidthWithoutBorder = offsetWidth
|
6
|
+
- parseCssValue(computedStyle.borderLeftWidth)
|
7
|
+
- parseCssValue(computedStyle.borderRightWidth);
|
8
|
+
const scrollbarWidth = offsetWidthWithoutBorder - element.clientWidth;
|
9
|
+
const clientWidth = offsetWidthWithoutBorder - scrollbarWidth;
|
10
|
+
return new DimensionInfo(offsetWidth, clientWidth, scrollbarWidth);
|
12
11
|
}
|
13
12
|
static getClientWidth(element) {
|
14
13
|
return this.getWidthInfo(element).clientSize;
|
15
14
|
}
|
16
15
|
static getHeightInfo(element) {
|
17
|
-
const
|
18
|
-
const
|
19
|
-
const
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
const
|
24
|
-
|
25
|
-
return new DimensionInfo(offsetSize, sizeWithScrollBar - scrollBarSize, scrollBarSize);
|
16
|
+
const computedStyle = getComputedStyle(element);
|
17
|
+
const offsetHeight = this.getOffsetHeight(element);
|
18
|
+
const offsetHeightWithoutBorder = offsetHeight
|
19
|
+
- parseCssValue(computedStyle.borderTopWidth)
|
20
|
+
- parseCssValue(computedStyle.borderBottomWidth);
|
21
|
+
const scrollbarHeight = offsetHeightWithoutBorder - element.clientHeight;
|
22
|
+
const clientHeight = offsetHeightWithoutBorder - scrollbarHeight;
|
23
|
+
return new DimensionInfo(offsetHeight, clientHeight, scrollbarHeight);
|
26
24
|
}
|
27
25
|
static getClientHeight(element) {
|
28
26
|
return this.getHeightInfo(element).clientSize;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "devexpress-richedit",
|
3
|
-
"version": "24.2.7-build-
|
3
|
+
"version": "24.2.7-build-25100-0108",
|
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.2.7-build-
|
18
|
-
"devextreme-dist": "24.2.7-build-
|
17
|
+
"devextreme": "24.2.7-build-25098-1935",
|
18
|
+
"devextreme-dist": "24.2.7-build-25098-1935"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"jszip": "~3.10.1",
|