selection.js是一个纯JavaScript库,可以多选网格,允许用户选择多个DOM元素用鼠标拖动和触控手势。事件调用方法selection.on('beforestart', evt => { console.log('beforestart', evt); }); selection.on('start', evt => { console.log('start', evt); }); selection.on('move', evt => { console.log('move', evt); }); selection.on('stop', evt => { console.log('stop', evt); });一些API方法// disable selection.disable(); // enable selection.enable(); // destroy selection.destroy(); // cancel the current selection process. selection.cancel(); // manually trigger the start of a selection // if silent is set to true, no beforestart event will be fired selection.trigger(evt:MouseEvent | TouchEvent, silent: boolean = true) // save the current selected elements and append those to the next selection selection.keepSelection(); // clear the previous selection selection.clearSelection(store:boolean = true); // get selected elements as an array selection.getSelection(); // manually append elements to the selection, can be a / an array of queries / elements // returns actual selected elements as array. selection.select(query:(String | Element)[]) // remove a particular element from the current selection // silent determines whether the move event should be fired selection.deselect(el:HTMLElement, silent: boolean = true)
文件目录······
暂无数据
猜你喜欢
更多»
项目推荐
更多»
PDF电子书
更多»
Java多线程编程核心技术
(2)
Linux命令详解词典.pdf
(5)
深入Python3中文版
(0)
百度SEO一本通.pdf
(0)
mysql必知必会.pdf
(2)
疯狂JAVA讲义 pdf电子书
(3)
C# 图解教程pdf电子书
(3)
研磨设计模式 pdf电子书
(0)