Skip to content

Commit

Permalink
Fixed ignoring dragging events.
Browse files Browse the repository at this point in the history
  • Loading branch information
vrtmrz committed Oct 17, 2022
1 parent ad3dbd0 commit 158c0ce
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "ninja-cursor",
"name": "Ninja Cursor",
"version": "0.0.7",
"version": "0.0.8",
"minAppVersion": "0.12.0",
"description": "The plugin which enhance cursor visibility.",
"author": "vorotamoroz",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ninja-cursor",
"version": "0.0.7",
"version": "0.0.8",
"description": "The plugin which enhance cursor visibility.",
"main": "main.js",
"scripts": {
Expand Down
44 changes: 23 additions & 21 deletions styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
:root {
--cursor-x1: "0px";
--cursor-x2: "0px";
--cursor-y1src: "0px";
--cursor-y2src: "0px";
--cursor-offset-y: "0px";
--cursor-drag-distance: "0px";
--cursor-drag-angle: "0deg";
--cursor-drag-width: "0px";
--cursor-drag-height: "0px";

--cursor-height: 18px;
--cursor-y1: calc(var(--cursor-y1src) + var(--cursor-offset-y));
--cursor-y2: calc(var(--cursor-y2src) + var(--cursor-offset-y));
--cursor-visibility: "hidden";
/* --cursor-margin-height: calc(var(--header-height)); */
}

.x-cursor {
position: relative;
top: 0;
Expand Down Expand Up @@ -34,23 +52,7 @@
animation: a2 75ms cubic-bezier(0.34, 1.26, 0.84, 1) 0s both;
}

:root {
--cursor-x1: "0px";
--cursor-x2: "0px";
--cursor-y1src: "0px";
--cursor-y2src: "0px";
--cursor-offset-y: "0px";
--cursor-drag-distance: "0px";
--cursor-drag-angle: "0deg";
--cursor-drag-width: "0px";
--cursor-drag-height: "0px";

--cursor-height: 18px;
--cursor-y1: calc(var(--cursor-y1src) + var(--cursor-offset-y));
--cursor-y2: calc(var(--cursor-y2src) + var(--cursor-offset-y));
--cursor-visibility: "hidden";
/* --cursor-color: --text-normal; */
}

.cursorWrapper {
display: block;
Expand All @@ -59,7 +61,7 @@
pointer-events: none;
background-color: transparent;
position: fixed;
top: 0;
top: var(--header-height);
left: 0;
right: 0;
bottom: 0;
Expand All @@ -69,7 +71,7 @@

@keyframes a1 {
0% {
transform: translate3d(var(--cursor-x1), var(--cursor-y1), 0);
transform: translate3d(var(--cursor-x1), calc(var(--cursor-y1) - var(--header-height)), 0);
background-color: var(--text-normal);
opacity: 0;
}
Expand All @@ -83,7 +85,7 @@
}

90% {
transform: translate3d(var(--cursor-x2), var(--cursor-y2), 0);
transform: translate3d(var(--cursor-x2), calc(var(--cursor-y2) - var(--header-height)), 0);
background-color: var(--text-normal);
opacity: 0.9;
}
Expand All @@ -95,7 +97,7 @@

@keyframes a2 {
0% {
transform: translate3d(var(--cursor-x1), var(--cursor-y1), 0);
transform: translate3d(var(--cursor-x1), calc(var(--cursor-y1) - var(--header-height)), 0);
background-color: var(--text-normal);
opacity: 0;
}
Expand All @@ -109,7 +111,7 @@
}

90% {
transform: translate3d(var(--cursor-x2), var(--cursor-y2), 0);
transform: translate3d(var(--cursor-x2), calc(var(--cursor-y2) - var(--header-height)), 0);
background-color: var(--text-normal);
opacity: 0.9;
}
Expand Down

0 comments on commit 158c0ce

Please sign in to comment.