MCPcopy
hub / github.com/Tencent/weui.js / setTranslate

Function setTranslate

src/picker/scroll.js:35–40  ·  view source on GitHub ↗
($target, diff)

Source from the content-addressed store, hash-verified

33 * set translate
34 */
35const setTranslate = ($target, diff) => {
36 return $target.css({
37 '-webkit-transform': `translate3d(0, ${diff}px, 0)`,
38 'transform': `translate3d(0, ${diff}px, 0)`
39 });
40};
41
42/**
43 * @desc get index of middle item

Callers 3

scroll.jsFile · 0.85
stopFunction · 0.85
_moveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected