Skip to content

Commit

Permalink
fix: extra space at bottom because of the card's action-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Apr 2, 2023
1 parent 972f2c0 commit 533a784
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/action-handler-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ActionHandler extends HTMLElement implements ActionHandler {

public connectedCallback() {
Object.assign(this.style, {
position: 'absolute',
position: 'fixed',
width: isTouch ? '100px' : '50px',
height: isTouch ? '100px' : '50px',
transform: 'translate(-50%, -50%)',
Expand Down Expand Up @@ -116,11 +116,11 @@ class ActionHandler extends HTMLElement implements ActionHandler {
let x;
let y;
if ((ev as TouchEvent).touches) {
x = (ev as TouchEvent).touches[0].pageX;
y = (ev as TouchEvent).touches[0].pageY;
x = (ev as TouchEvent).touches[0].clientX;
y = (ev as TouchEvent).touches[0].clientY;
} else {
x = (ev as MouseEvent).pageX;
y = (ev as MouseEvent).pageY;
x = (ev as MouseEvent).clientX;
y = (ev as MouseEvent).clientY;
}

if (options.hasHold) {
Expand Down

0 comments on commit 533a784

Please sign in to comment.