[Libreoffice-commits] online.git: loleaflet/src

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 29 19:37:55 UTC 2019


 loleaflet/src/layer/tile/CalcTileLayer.js    |    2 +-
 loleaflet/src/layer/tile/ImpressTileLayer.js |    2 +-
 loleaflet/src/layer/tile/TileLayer.js        |    4 ++--
 loleaflet/src/layer/tile/WriterTileLayer.js  |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit be2b0e2f6f6a61e3793aede98e63b18fc23b1ac9
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jul 2 15:13:56 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 29 20:36:57 2019 +0100

    Use vex annotation dialog also on tablet
    
    Change-Id: Id16c86c423b3aa3585a840ec068ed563c0d1221e

diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index fca8845a7..1b5ae48a8 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -14,7 +14,7 @@ L.CalcTileLayer = L.TileLayer.extend({
 	},
 
 	newAnnotation: function (comment) {
-		if (window.mode.isMobile()) {
+		if (window.mode.isMobile() || window.mode.isTablet) {
 			var that = this;
 			this.newAnnotationVex(comment, function(annotation) { that._onAnnotationSave(annotation); });
 		} else {
diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 86bd43dd3..1b362c218 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -22,7 +22,7 @@ L.ImpressTileLayer = L.TileLayer.extend({
 		}
 		this.onAnnotationCancel();
 
-		if (window.mode.isMobile()) {
+		if (window.mode.isMobile() || window.mode.isTablet()) {
 			this.newAnnotationVex(comment, this.onAnnotationSave);
 		} else {
 			this._draft = L.annotation(L.latLng(0, 0), comment, {noMenu: true}).addTo(this._map);
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index d7bdd4e75..7854b198d 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -405,9 +405,9 @@ L.TileLayer = L.GridLayer.extend({
 		var dateOptions = { weekday: 'short', year: 'numeric', month: 'short', day: 'numeric' };
 		$(this._contentDate).text(isNaN(d.getTime()) ? comment.dateTime: d.toLocaleDateString(String.locale, dateOptions));
 
-		dialog.get(0).insertBefore(this._author, dialog.get(0).childNodes[0]);
+		dialog.contentEl.insertBefore(this._author, dialog.contentEl.childNodes[0]);
 
-		dialog.find('textarea').focus();
+		$(dialog.contentEl).find('textarea').focus();
 	},
 
 	clearAnnotations: function() {
diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js
index fa26b1bb2..3fd3e2c07 100644
--- a/loleaflet/src/layer/tile/WriterTileLayer.js
+++ b/loleaflet/src/layer/tile/WriterTileLayer.js
@@ -21,7 +21,7 @@ L.WriterTileLayer = L.TileLayer.extend({
 		if (comment.anchorPos) {
 			this._annotations.modify(this._annotations.add(comment));
 		}
-		if (window.mode.isMobile()) {
+		if (window.mode.isMobile() || window.mode.isTablet) {
 			var that = this;
 			this.newAnnotationVex(comment, function(annotation) { that._annotations._onAnnotationSave(annotation); });
 		}


More information about the Libreoffice-commits mailing list