loleaflet/src/control/Control.ColumnHeader.js |    5 +++--
 loleaflet/src/control/Control.RowHeader.js    |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 817cacde84286a6963a29bb09c8606db7d71bf24
Author: Henry Castro <hcas...@collabora.com>
Date:   Sat Aug 13 12:16:03 2016 -0400

    loleaflet: drag & drop to unhide column/row

diff --git a/loleaflet/src/control/Control.ColumnHeader.js 
b/loleaflet/src/control/Control.ColumnHeader.js
index b38ea32..ba928eb 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -109,7 +109,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
                        text.setAttribute('rel', 'spreadsheet-column-' + 
content); // for easy addressing
                        text.innerHTML = content;
                        width = Math.round(converter.call(context, twip).x) - 1;
-                       if (width === -1) {
+                       if (width <= 0) {
                                L.DomUtil.setStyle(column, 'display', 'none');
                        } else if (width < 10) {
                                text.column = iterator + 1;
@@ -211,7 +211,8 @@ L.Control.ColumnHeader = L.Control.Header.extend({
                        var command = {
                                Column: {
                                        type: 'unsigned short',
-                                       value: item.column
+                                       value: item.parentNode && 
item.parentNode.nextSibling &&
+                                              
L.DomUtil.getStyle(item.parentNode.nextSibling, 'display') === 'none' ? 
item.column + 1 : item.column
                                },
                                Width: {
                                        type: 'unsigned short',
diff --git a/loleaflet/src/control/Control.RowHeader.js 
b/loleaflet/src/control/Control.RowHeader.js
index 119c020..c4ced20 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -107,7 +107,7 @@ L.Control.RowHeader = L.Control.Header.extend({
                        text.setAttribute('rel', 'spreadsheet-row-' + content); 
// for easy addressing
                        text.innerHTML = content;
                        height = Math.round(converter.call(context, twip).y) - 
1;
-                       if (height === -1) {
+                       if (height <= 0) {
                                L.DomUtil.setStyle(row, 'display', 'none');
                        } else if (height < 10) {
                                text.row = iterator + 1;
@@ -193,7 +193,8 @@ L.Control.RowHeader = L.Control.Header.extend({
                        var command = {
                                Row: {
                                        type: 'unsigned short',
-                                       value: item.row
+                                       value: item.parentNode && 
item.parentNode.nextSibling &&
+                                              
L.DomUtil.getStyle(item.parentNode.nextSibling, 'display') === 'none' ? 
item.row + 1 : item.row
                                },
                                Height: {
                                        type: 'unsigned short',
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to