Skip to content

Commit

Permalink
fix: scroll cmd for pointer down at scrolltrack (#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
lumixraku authored Sep 21, 2024
1 parent b4fcb4a commit 8e9f513
Show file tree
Hide file tree
Showing 9 changed files with 253 additions and 270 deletions.
20 changes: 10 additions & 10 deletions packages/engine-render/src/shape/base-scroll-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ export abstract class BaseScrollBar extends Disposable {

verticalMinusMiniThumb: number = 0;

horizonBarRect: Nullable<Rect>;
horizonScrollTrack: Nullable<Rect>;

horizonThumbRect: Nullable<Rect>;

verticalBarRect: Nullable<Rect>;
verticalScrollTrack: Nullable<Rect>;

verticalThumbRect: Nullable<Rect>;

Expand Down Expand Up @@ -160,27 +160,27 @@ export abstract class BaseScrollBar extends Disposable {
return this.verticalThumbRect;
}

if (this.horizonBarRect?.isHit(coord)) {
return this.horizonBarRect;
if (this.horizonScrollTrack?.isHit(coord)) {
return this.horizonScrollTrack;
}

if (this.verticalBarRect?.isHit(coord)) {
return this.verticalBarRect;
if (this.verticalScrollTrack?.isHit(coord)) {
return this.verticalScrollTrack;
}

return null;
}

override dispose() {
this.horizonBarRect?.dispose();
this.horizonScrollTrack?.dispose();
this.horizonThumbRect?.dispose();
this.verticalBarRect?.dispose();
this.verticalScrollTrack?.dispose();
this.verticalThumbRect?.dispose();
this.placeholderBarRect?.dispose();

this.horizonBarRect = null;
this.horizonScrollTrack = null;
this.horizonThumbRect = null;
this.verticalBarRect = null;
this.verticalScrollTrack = null;
this.verticalThumbRect = null;
this.placeholderBarRect = null;
}
Expand Down
Loading

0 comments on commit 8e9f513

Please sign in to comment.