@arisbh/marqueeck
Advanced tools
Comparing version 0.0.55 to 0.1.1
export type MarqueeckOptions = { | ||
speed?: number; | ||
speed?: number | (() => number); | ||
direction?: 'left' | 'right'; | ||
@@ -4,0 +4,0 @@ gap?: number; |
@@ -14,5 +14,4 @@ export function MarqueeckTranslate(node, options) { | ||
function update() { | ||
const currentSpeed = options.currentSpeed(); | ||
const currentSpeed = typeof options.currentSpeed() === 'function' ? options.currentSpeed() : options.currentSpeed(); | ||
currentX += direction === 'left' ? -currentSpeed / 60 : currentSpeed / 60; | ||
// console.log(currentX); | ||
if (direction === 'left') { | ||
@@ -19,0 +18,0 @@ node.style.transform = `translateX(${-currentX}px)`; |
{ | ||
"name": "@arisbh/marqueeck", | ||
"version": "0.0.55", | ||
"version": "0.1.1", | ||
"description": "Marqueeck is a custom and customizable marquee component for Sveltekit", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
15759
12
172