Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@mand-mobile/scroller
Advanced tools
Platform-independent virtual scrolling computing engine
class Scroller {
constructor(
wrapper: HTMLElement | string,
content:HTMLElement | string,
options: ScrollerOptions
) { }
}
import Scroller '@mand-mobile/scroller'
const scroller = new Scroller(wrapper, content)
scroller.setDimensions(
wrapper.getBoundingClientRect(),
content.getBoundingClientRect()
)
scroller.on('translate', (point, styles) => { })
Refer to BetterScroll - options
pending: boolean
Determine whether the current scroller is in the process of scrolling animation
scrollable: {x: boolean, y: boolean}
Determine whether the current scroller can scroll horizontally and vertically
handleStart: (e: TouchEvent) => void
handleMove: (e: TouchEvent) => void
handleEnd: (e: TouchEvent) => void
scrollTo: ( x: number, y: number, time = 0, easingFn?: (t: number) => number ) => void
scrollBy: ( deltaX: number, deltaY: number, time = 0, easingFn?: (t: number) => number ) => void
Scroll the distance x, y in the horizontal and vertical directions relative to the current position.
getCurrentPos: () => {x: number, y: number}
setDimensions: ( wrapperRect: DOMRect, contentRect: DOMRect ) => void
Set the scroller wrapper and content rect size.
refresh: () => void
Recalculate the scroller, it must be called to ensure that the scrolling effect is normal when the scrolling area changes.
stopAnimation: () => void
stop the currently running scroll animation immediately.
enable: () => void
disable: () => void
destroy: () => void
Destroy scroller and unbind events.
Before scrolling begins (touchstart triggered)
scroller.on('beforeScrollStart', () => {})
When scrolling starts (touchmove)
scroller.on('scrollStart', () => {})
When touch ends (touchend triggered)
scroller.on('touchEnd', () => {})
When scrolling ends (touchend triggered and momentum finished)
scroller.on('scrollEnd', (point: {x: number, y: number}) => {})
during scrolling
scroller.on('scroll', (point: {x: number, y: number}) => {})
Scrolling is cancelled. For example, if you force a scrolling to stop.
scroller.on('scrollCancel', () => {})
Internal translate triggered during scrolling, generally used to receive transform style information.
scroller.on('translate', (point: {x: number, y: number}, styles: {}) => {})
scroller.on('refresh', () => {})
scroller.on('destroy', () => {})
class WheelScroller {
constructor(scroller: Scroller, options: Options) { }
}
import Scroller from '@mand-mobile/scroller'
import WheelScroller from '@mand-mobile/scroller/lib/wheel'
const scroller = new Scroller(wrapper, content)
scroller.setDimensions(
wrapper.getBoundingClientRect(),
content.getBoundingClientRect()
)
const wheel = new WheelScroller(scroller)
wheelTo: (index = 0, time = 0) => void
getSelectedIndex: () => number
class PullDown {
constructor(scroller: Scroller, options: Options) { }
}
import PullDown from '@mand-mobile/scroller/lib/pull-down'
const scroller = new Scroller(wrapper, content)
scroller.setDimensions(
wrapper.getBoundingClientRect(),
content.getBoundingClientRect()
)
const refresher = new PullDown(scroller)
finish: () => void
triggerPullToRefresh: () => void
scroller.on('pullingDownReady', () => {})
scroller.on('pullingDown', () => {})
class Animator {
constructor() { }
}
import Animator from '@mand-mobile/scroller/lib/animator'
const animatior = new Animator()
const id = animatior.start(
percent => {
console.log(percent)
}
)
animatior.stop(id)
start: (
stepCallback: (percent: number) => void,
verifyCallback: (now: number, id: number) => boolean | null,
completedCallback: (percent: number, id: number, isComplete: boolean) => void | null,
duration?: number,
easingFn?: (t: number) => number
) => number
stop: (id: number) => id
isRunning: (id: number) => id
FAQs
> TODO: description
The npm package @mand-mobile/scroller receives a total of 1 weekly downloads. As such, @mand-mobile/scroller popularity was classified as not popular.
We found that @mand-mobile/scroller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.