Slider: `ebLast` and `dy` only needed with draging

master
thyttan 2023-10-03 01:02:13 +02:00
parent 17f72c680e
commit 9b1cfd4836
1 changed files with 3 additions and 3 deletions

View File

@ -64,12 +64,12 @@ try { // For making it possiblie to run the test app in the following catch stat
// Initialize the level // Initialize the level
o.v.level = (o.c.currLevel||o.c.currLevel===0)?o.c.currLevel:o.c.steps/2; o.v.level = (o.c.currLevel||o.c.currLevel===0)?o.c.currLevel:o.c.steps/2;
o.v.ebLast = 0;
o.v.dy = 0;
// Only add interactivity if wanted. // Only add interactivity if wanted.
if (o.c.dragableSlider) { if (o.c.dragableSlider) {
o.v.ebLast = 0;
o.v.dy = 0;
o.f.wasOnDragRect = (exFirst, eyFirst)=>{ o.f.wasOnDragRect = (exFirst, eyFirst)=>{
"ram"; "ram";
return exFirst>o.c.dragRect.x && exFirst<o.c.dragRect.x2 && eyFirst>o.c.dragRect.y && eyFirst<o.c.dragRect.y2; return exFirst>o.c.dragRect.x && exFirst<o.c.dragRect.x2 && eyFirst>o.c.dragRect.y && eyFirst<o.c.dragRect.y2;