[Libreoffice-commits] online.git: loleaflet/src
Jan Holesovsky
kendy at collabora.com
Mon Jan 25 02:32:49 PST 2016
loleaflet/src/control/Control.ColumnHeader.js | 4 +++-
loleaflet/src/control/Control.RowHeader.js | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 29cc2e1b21d5749803e19732c5e07c504bd91f74
Author: Jan Holesovsky <kendy at collabora.com>
Date: Mon Jan 25 11:23:59 2016 +0100
loleaflet: Add 'rel's for spreadsheet column/row headers for easy addressing.
diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js
index 12238e4..ab640ce 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -61,7 +61,9 @@ L.Control.ColumnHeader = L.Control.extend({
width = columns[iterator].size - (iterator > 0 ? columns[iterator - 1].size : 0);
twip = new L.Point(width, width);
text = L.DomUtil.create('div', 'spreadsheet-header-column', this._columns);
- text.innerHTML = columns[iterator].text;
+ var content = columns[iterator].text;
+ text.setAttribute('rel', 'spreadsheet-column-' + content); // for easy addressing
+ text.innerHTML = content;
width = Math.round(converter.call(context, twip).x) - 1 + 'px';
L.DomUtil.setStyle(text, 'width', width);
}
diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js
index bca11e5..b69bc02 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -60,7 +60,9 @@ L.Control.RowHeader = L.Control.extend({
height = rows[iterator].size - (iterator > 0 ? rows[iterator - 1].size : 0);
twip = new L.Point(height, height);
text = L.DomUtil.create('div', 'spreadsheet-header-row', this._rows);
- text.innerHTML = rows[iterator].text;
+ var content = rows[iterator].text;
+ text.setAttribute('rel', 'spreadsheet-row-' + content); // for easy addressing
+ text.innerHTML = content;
height = Math.round(converter.call(context, twip).y) - 1 + 'px';
L.DomUtil.setStyle(text, 'line-height', height);
L.DomUtil.setStyle(text, 'height', height);
More information about the Libreoffice-commits
mailing list