ReusableDrag
touch / mouse create utils
import resusable-drag
<!-- or script -->
Define drag
const touch_sliding_screen = { return // Define state wrapper: thisel pagination: thisel slidingDistance: 300 delay: 2000 //..... } { // Define init thiselstylebackground = 'rgba(0,0,0,.5)' //.... } methods: // Define methods { //.... } // reusable-drag will detect the current device type, // and when it is detected as a mobile device, it will automatically switch to touch and other events touch: // Define touch event { } { } { } // reusable-drag will detect the current device type, // and when it is detected as a PC device, it will automatically switch to mouse and other events /* mouse: { // Define mouse event down (ev) {},move (ev) {},up (ev) {} }, */
create drag
touch_sliding_screen