Skip to content

Commit

Permalink
Fix progress active set in tick (#20)
Browse files Browse the repository at this point in the history
* Fixed setting progress.active inside tick to flip to true when inside root

* 0.4.10
  • Loading branch information
ydaniv authored Feb 19, 2025
1 parent 85a09cf commit f028c8e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ function getController$1 (config) {

const velocity = {x: progress.vx, y: progress.vy};

if (config.allowActiveEvent && (normalizedX > 1 || normalizedY > 1 || normalizedX < 0 || normalizedY < 0)) {
progress.active = false;
if (config.allowActiveEvent) {
progress.active = (normalizedX <= 1 && normalizedY <= 1 && normalizedX >= 0 && normalizedY >= 0);
}

// run effect
Expand Down
4 changes: 2 additions & 2 deletions docs/demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ function getController$1 (config) {

const velocity = {x: progress.vx, y: progress.vy};

if (config.allowActiveEvent && (normalizedX > 1 || normalizedY > 1 || normalizedX < 0 || normalizedY < 0)) {
progress.active = false;
if (config.allowActiveEvent) {
progress.active = (normalizedX <= 1 && normalizedY <= 1 && normalizedX >= 0 && normalizedY >= 0);
}

// run effect
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset='utf-8'>
<title>kuliso 0.4.8 | Documentation</title>
<title>kuliso 0.4.9 | Documentation</title>
<meta name='description' content='Tiny library for performant pointer-driven or gyroscope-driven effects'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/bass.css' rel='stylesheet'>
Expand All @@ -15,7 +15,7 @@
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
<div class='py1 px2'>
<h3 class='mb0 no-anchor'>kuliso</h3>
<div class='mb1'><code>0.4.8</code></div>
<div class='mb1'><code>0.4.9</code></div>
<input
placeholder='Filter'
id='filter-input'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kuliso",
"version": "0.4.9",
"version": "0.4.10",
"sideeffects": true,
"description": "Tiny library for performant pointer-driven or gyroscope-driven effects",
"main": "dist/index.cjs",
Expand Down
4 changes: 2 additions & 2 deletions src/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export function getController (config) {

const velocity = {x: progress.vx, y: progress.vy};

if (config.allowActiveEvent && (normalizedX > 1 || normalizedY > 1 || normalizedX < 0 || normalizedY < 0)) {
progress.active = false;
if (config.allowActiveEvent) {
progress.active = (normalizedX <= 1 && normalizedY <= 1 && normalizedX >= 0 && normalizedY >= 0);
}

// run effect
Expand Down

0 comments on commit f028c8e

Please sign in to comment.