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(true);
322
- const inVerticalArea = evtY >= this.canvasPosition.y && evtY <= this.canvasPosition.y + this.sizes.getVisibleAreaHeight(true);
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 && this.canvasPosition.y + this.sizes.getVisibleAreaHeight(true) - evtY <= AUTOSCROLL_AREA_SIZE)
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 && this.canvasPosition.x + this.sizes.getVisibleAreaWidth(true) - evtX <= AUTOSCROLL_AREA_SIZE)
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: Element): DimensionInfo;
3
- static getClientWidth(element: Element): number;
4
- static getHeightInfo(element: Element): DimensionInfo;
5
- static getClientHeight(element: Element): number;
6
- static getOffsetSize(element: Element): DOMRect;
7
- static getOffsetWidth(element: Element): number;
8
- static getOffsetHeight(element: Element): number;
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 offsetSize = SizeUtils.getOffsetWidth(element);
4
- const style = getComputedStyle(element);
5
- const inset = parseCssValue(style.borderLeftWidth)
6
- + parseCssValue(style.borderRightWidth)
7
- + parseCssValue(style.paddingLeft)
8
- + parseCssValue(style.paddingRight);
9
- const sizeWithScrollBar = offsetSize - inset;
10
- const scrollBarSize = Math.round(sizeWithScrollBar) - element.clientWidth;
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 offsetSize = SizeUtils.getOffsetHeight(element);
18
- const style = getComputedStyle(element);
19
- const inset = parseCssValue(style.borderTopWidth)
20
- + parseCssValue(style.borderBottomWidth)
21
- + parseCssValue(style.paddingTop)
22
- + parseCssValue(style.paddingBottom);
23
- const sizeWithScrollBar = offsetSize - inset;
24
- const scrollBarSize = Math.round(sizeWithScrollBar) - element.clientHeight;
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-25093-0104",
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-25091-1935",
18
- "devextreme-dist": "24.2.7-build-25091-1935"
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",