loleaflet/src/control/Control.LokDialog.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit d93d9dc59b2ef4e48b7d768a3df8ef153d4e51e2 Author: Henry Castro <[email protected]> AuthorDate: Wed Jul 24 17:57:29 2019 -0400 Commit: Henry Castro <[email protected]> CommitDate: Fri Nov 15 15:49:32 2019 +0100 loleaflet: fix the dragging limits of the dialog box Change-Id: Id6336ce5bde9567c3a99c4660e8445f65f7545a2 Reviewed-on: https://gerrit.libreoffice.org/82535 Reviewed-by: Henry Castro <[email protected]> Tested-by: Henry Castro <[email protected]> diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 24646d46f..29c5cfef5 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -75,7 +75,11 @@ L.Control.LokDialog = L.Control.extend({ (newX < -target.width/2 || newY < -target.height/2 || newX > window.innerWidth - target.width/2 || newY > window.innerHeight - target.height/2)) { - return; + var dialog = $('.lokdialog_container'); + var left = parseFloat(dialog.css('left')); + var top = parseFloat(dialog.css('top')); + newX = Math.max(newX, -left); + newY = Math.max(newY, -top); } target.transformation.translate = { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
