Skip to content

Commit

Permalink
fix: cover cursor by object
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobkim9881 committed Mar 17, 2022
1 parent 5675e2e commit 7f74c7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion functions/float.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ function mouseEvent(e) {
let randomBallSize = Math.trunc(Math.random() * ballSize);
let ranXpos = parseInt(e.clientX, 10);
let ranYpos = parseInt(e.clientY, 10);
let yHeight = parseInt(window.innerHeight);
let awayFromCursor = - 30 * (yHeight - ranYpos) /yHeight;
// let ranH = Math.trunc(Math.random() * 360);
obj.className = 'flubbers'
obj.style.position = 'fixed';
Expand All @@ -21,7 +23,7 @@ obj.style.top= ranYpos + 'px';


obj.animate([
{top: (ranYpos * 0.96) + 'px',
{top: (ranYpos * 0.96 + awayFromCursor) + 'px',
transform: 'scale(1,1)',
width: (ballSize * 1.1) + 'px',
borderRadius: '70% 70% 50% 50%',
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_appName__",
"version": "0.2.5.6",
"version": "0.2.5.7",
"permissions": ["activeTab", "declarativeContent", "contextMenus", "storage", "scripting"],
"host_permissions": ["https://*/*"],
"content_scripts": [
Expand Down

0 comments on commit 7f74c7f

Please sign in to comment.