1
0
mirror of https://github.com/MatMoul/quickdial-webext.git synced 2024-12-23 15:36:12 +00:00

Bug Can move tile when this is the first added item

This commit is contained in:
MatMoul 2018-10-21 22:47:59 +02:00
parent c68d2d4cfb
commit 67fea9aa9c

View File

@ -346,6 +346,7 @@ dial.initGrid = function(){
ev.preventDefault(); ev.preventDefault();
return; return;
} }
if(dial.page == 0) dial.page = 1;
var index = (dial.page - 1) * (app.settings.grid.rows * app.settings.grid.columns) + +(ev.target.parentElement.getAttribute('gridindex')); var index = (dial.page - 1) * (app.settings.grid.rows * app.settings.grid.columns) + +(ev.target.parentElement.getAttribute('gridindex'));
if(app.settings.grid.backNode && dial.path != '/') index -= dial.page; if(app.settings.grid.backNode && dial.path != '/') index -= dial.page;
ev.dataTransfer.setData("text/plain", JSON.stringify({parentId: app.node.id, index: index})); ev.dataTransfer.setData("text/plain", JSON.stringify({parentId: app.node.id, index: index}));