Skip to content

Commit 13be467

Browse files
get rid of use PointerLikeEvent
1 parent 0e6351d commit 13be467

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

packages/devextreme/js/__internal/ui/overlay/overlay.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ const PREVENT_SAFARI_SCROLLING_CLASS = 'dx-prevent-safari-scrolling';
7676

7777
type AnimationDirection = 'to' | 'from';
7878

79-
export type PointerLikeEvent = DxEvent<PointerInteractionEvent>;
80-
81-
type EventHandler = (e: PointerLikeEvent) => boolean | undefined;
79+
type EventHandler = (e: DxEvent<PointerInteractionEvent>) => boolean | undefined;
8280

8381
type TabTerminatorHandler = (e: KeyboardEvent) => void;
8482

@@ -164,7 +162,7 @@ export interface OverlayActions<
164162
}
165163

166164
ready(() => {
167-
const callback = (e: PointerLikeEvent): void => {
165+
const callback = (e: DxEvent<PointerInteractionEvent>): void => {
168166
for (let i = OVERLAY_STACK.length - 1; i >= 0; i -= 1) {
169167
if (!OVERLAY_STACK[i]._proxiedDocumentDownHandler?.(e)) {
170168
return;
@@ -435,7 +433,7 @@ class Overlay<
435433

436434
_initHideOnOutsideClickHandler(): void {
437435
this._proxiedDocumentDownHandler = (
438-
e: PointerLikeEvent,
436+
e: DxEvent<PointerInteractionEvent>,
439437
): boolean => this._documentDownHandler(e);
440438
}
441439

@@ -445,7 +443,7 @@ class Overlay<
445443
this._initPositionController();
446444
}
447445

448-
_documentDownHandler(e: PointerLikeEvent): boolean {
446+
_documentDownHandler(e: DxEvent<PointerInteractionEvent>): boolean {
449447
if (this._showAnimationProcessing) {
450448
this._stopAnimation();
451449
}
@@ -472,7 +470,7 @@ class Overlay<
472470
return Boolean(propagateOutsideClick);
473471
}
474472

475-
_shouldHideOnOutsideClick(e: PointerLikeEvent): boolean {
473+
_shouldHideOnOutsideClick(e: DxEvent<PointerInteractionEvent>): boolean {
476474
const { hideOnOutsideClick } = this.option();
477475

478476
if (isFunction(hideOnOutsideClick)) {
@@ -482,7 +480,7 @@ class Overlay<
482480
return Boolean(hideOnOutsideClick);
483481
}
484482

485-
_outsideClickHandler(e: PointerLikeEvent): void {
483+
_outsideClickHandler(e: DxEvent<PointerInteractionEvent>): void {
486484
const { shading } = this.option();
487485

488486
if (shading) {

packages/devextreme/js/__internal/ui/overlay/overlay_position_controller.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import swatch from '@ts/core/utils/swatch_container';
1818
import type {
1919
OverlayActions,
2020
OverlayProperties,
21-
PointerLikeEvent,
2221
} from '@ts/ui/overlay/overlay';
2322

2423
import windowUtils from '../../core/utils/m_window';
@@ -301,7 +300,7 @@ export class OverlayPositionController<
301300
this.detectVisualPositionChange();
302301
}
303302

304-
_raisePositionedEvents(event?: PointerLikeEvent): void {
303+
_raisePositionedEvents(event?: DxEvent<PointerInteractionEvent>): void {
305304
const previousPosition = this._previousVisualPosition;
306305
const newPosition = this._visualPosition;
307306

0 commit comments

Comments
 (0)