loleaflet/dist/toolbar/toolbar.js | 37 +++++++++++++++++-------------------- loleaflet/src/core/Browser.js | 2 +- 2 files changed, 18 insertions(+), 21 deletions(-)
New commits: commit 6f212ee49db21cf468a3afeb1aadc00e2043b27d Author: Pranav Kant <[email protected]> Date: Wed Dec 14 20:51:19 2016 +0530 loleaflet: Fix L.Browser.pointer window.PointerEvent is available even on non-touch devices in chrome and Edge (and maybe others too, firefox doesn't have it). So it results in L.Browser.pointer resulting in true on Chrome, Edge while false in firefox which leads to click event not working on these browsers. Fallout from a0036f24bac8fdfd67055935aa756c873db30fe7 Change-Id: I73b5824882e1cc1f87cdfbc9e7e31f22320367b1 diff --git a/loleaflet/src/core/Browser.js b/loleaflet/src/core/Browser.js index fd9d7a8..38640b9 100644 --- a/loleaflet/src/core/Browser.js +++ b/loleaflet/src/core/Browser.js @@ -30,7 +30,7 @@ mobile = typeof orientation !== 'undefined' || ua.indexOf('mobile') !== -1, msPointer = !window.PointerEvent && window.MSPointerEvent, - pointer = window.PointerEvent || msPointer, + pointer = (window.PointerEvent && navigator.maxTouchPoints) || msPointer, ie3d = ie && ('transition' in doc.style), webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23, commit 07df52e45ad7c9478b3b404caf1445081122b50c Author: Pranav Kant <[email protected]> Date: Wed Dec 14 19:32:00 2016 +0530 loleaflet: Refresh the toolbar Change-Id: I16fed0dd508ce6d3863157d316ab17898b680df5 diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index 8db30ae..a80ab4a 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -427,6 +427,23 @@ $(function () { $('#backColorPicker').on('change.color', onColorPick); } + // Fill the style select box if not yet filled + if ($('.styles-select')[0].length === 0) { + var data = ['']; + // Inserts a separator element + data = data.concat({text: '\u2500\u2500\u2500\u2500\u2500\u2500', disabled: true}); + + L.Styles.impressLayout.forEach(function(layout) { + data = data.concat({id: layout.id, text: _(layout.text)}); + }, this); + + $('.styles-select').select2({ + data: data, + placeholder: _('Layout') + }); + $('.styles-select').on('select2:select', onStyleSelect); + } + insertTable(); } }); @@ -1280,26 +1297,6 @@ map.on('updatepermission', function (e) { } }); -map.on('statusindicator', function (e) { - if (e.statusType === 'loleafletloaded') { - var data = ['']; - if (map.getDocType() === 'presentation') { - // Inserts a separator element - data = data.concat({text: '\u2500\u2500\u2500\u2500\u2500\u2500', disabled: true}); - - L.Styles.impressLayout.forEach(function(layout) { - data = data.concat({id: layout.id, text: _(layout.text)}); - }, this); - - $('.styles-select').select2({ - data: data, - placeholder: _('Layout') - }); - $('.styles-select').on('select2:select', onStyleSelect); - } - } -}); - map.on('keydown', function (e) { if (e.originalEvent.ctrlKey && !e.originalEvent.altKey && (e.originalEvent.key === 'f' || e.originalEvent.key === 'F')) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
