0.1.18 • Published 6 years ago
bindingx-web-polyfill v0.1.18
bindingx-web-polyfill
Install & Use
import bindingx from 'bindingx-web-polyfill';
var blockEl = document.getElementById('block');
var x = 0;
function bind() {
bindingx.bind({
anchor: blockEl,
eventType: 'pan',
options: {
touchAction: 'pan-x'
},
props: [
{
element: blockEl,
property: 'transform.translateX',
expression: {
transformed: `{\"type\":\"+\",\"children\":[{\"type\":\"Identifier\",\"value\":\"x\"},{\"type\":\"NumericLiteral\",\"value\":${x}}]}`
}
}
]
}, (e) => {
if (e.state === 'end') {
x += e.deltaX;
}
});
}
bind();
blockEl.addEventListener('touchstart', () => {
bind();
});
0.1.18
6 years ago
0.1.17
6 years ago
0.1.16
6 years ago
0.1.15
6 years ago
0.1.14
6 years ago
0.1.13
6 years ago
0.1.12
6 years ago
0.1.11
6 years ago
0.1.10
6 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago