loleaflet/src/control/Control.LokDialog.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit bb6c0f15fecd53a388e5ba8884446e74b201e13a Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Jul 4 00:03:19 2019 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Tue Aug 20 17:11:28 2019 +0200 loeaflet: mobile: adjust the dialog position to top center Change-Id: Ie53ff4702a1559e4e3387adb8f12a70907b43117 Reviewed-on: https://gerrit.libreoffice.org/77838 Reviewed-by: Henry Castro <hcas...@collabora.com> Tested-by: Henry Castro <hcas...@collabora.com> diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index f655a79c3..00c957de5 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -453,7 +453,7 @@ L.Control.LokDialog = L.Control.extend({ this._createDialogCursor(strId); var dlgInput = this._createDialogInput(strId); this._setupWindowEvents(id, dialogCanvas, dlgInput); - this._setupGestures(id, dialogCanvas); + this._setupGestures(dialogContainer, id, dialogCanvas); this._currentId = id; this._sendPaintWindow(id, this._createRectStr(id)); @@ -525,7 +525,7 @@ L.Control.LokDialog = L.Control.extend({ }); }, - _setupGestures: function(id, canvas) { + _setupGestures: function(dialogContainer, id, canvas) { var self = this; var dialogID = id; var targetId = toZoomTargetId(canvas.id); @@ -543,6 +543,12 @@ L.Control.LokDialog = L.Control.extend({ offsetY = -(height - window.screen.height) / 2; } + // FIXME. window.mode.isMobile() return false + if (L.Browser.mobile() && screen.width < 768 && height < window.screen.height) { + $(dialogContainer).dialog('option', 'position', { my: 'left top', at: 'let top', of: window }); + offsetY = 0; + } + var state = { startX: offsetX, startY: offsetY, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits