From 1431c5edfeadcc16081f677fffbdf56675a686ef Mon Sep 17 00:00:00 2001 From: MatMoul Date: Thu, 5 Oct 2017 22:06:09 +0200 Subject: [PATCH 1/3] Bug: drag-drop on second and next page --- src/js/dial.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/js/dial.js b/src/js/dial.js index 1118236..9adf0f8 100644 --- a/src/js/dial.js +++ b/src/js/dial.js @@ -196,7 +196,10 @@ dial.initGrid = function(name, settings, container){ link.onmousedown = function(){ dial._selectedItem = this; }; function dragstart_handler(ev) { - ev.dataTransfer.setData("text/plain", ev.target.parentElement.getAttribute('gridindex')); + var index = (dial.page - 1) * (app.settings.grid.rows * app.settings.grid.columns) + +(ev.target.parentElement.getAttribute('gridindex')); + if(settings.cells.backPanel && dial.path) index -= dial.page; + console.log(index); + ev.dataTransfer.setData("text/plain", index); } function dragover_handler(ev) { ev.preventDefault(); @@ -208,14 +211,11 @@ dial.initGrid = function(name, settings, container){ var StartIndex = ev.dataTransfer.getData("text"); var EndIndex = 0; if(ev.target.tagName == 'DIV'){ - EndIndex = ev.target.parentElement.parentElement.getAttribute('gridindex') + EndIndex = (dial.page - 1) * (app.settings.grid.rows * app.settings.grid.columns) + +(ev.target.parentElement.parentElement.getAttribute('gridindex')); } else{ - EndIndex = ev.target.getAttribute('gridindex'); - } - if(settings.cells.backPanel && dial.path){ - StartIndex-=1; - EndIndex-=1; + EndIndex =(dial.page - 1) * (app.settings.grid.rows * app.settings.grid.columns) + +(ev.target.getAttribute('gridindex')); } + if(settings.cells.backPanel && dial.path) EndIndex -= dial.page; app.setNodeIndex(dial.Node, StartIndex, EndIndex); } link.draggable = true; From b458d78fd047b0b16f50e3962dbe62747570c9b9 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Thu, 5 Oct 2017 22:06:35 +0200 Subject: [PATCH 2/3] update makerelease --- makerelease | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makerelease b/makerelease index 4f5f33e..fc4ae6d 100755 --- a/makerelease +++ b/makerelease @@ -35,7 +35,7 @@ version=$1 sed -i "/\"version\":/c\ \ \"version\": \"$version\"," src/manifest.json -git commit -m "Version $version" makefile src/* +git commit -a -m "Version $version" git push git checkout master From 15310d57afca3526a6495befe84cd0f7799bd834 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Thu, 5 Oct 2017 22:07:35 +0200 Subject: [PATCH 3/3] Version 0.0.2 --- src/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.json b/src/manifest.json index 94728d6..2cc89c6 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Quick Dial", - "version": "0.0.1", + "version": "0.0.2", "author": "MatMoul", "homepage_url": "https://github.com/MatMoul/quickdial-webext", "developer": {