loleaflet/src/layer/FormFieldButtonLayer.js | 13 +++++++++++++ 1 file changed, 13 insertions(+)
New commits: commit 13f1f0182edd159034489caed910b5e1608d07f3 Author: Tamás Zolnai <[email protected]> AuthorDate: Mon May 18 11:27:54 2020 +0200 Commit: Tamás Zolnai <[email protected]> CommitDate: Mon May 18 12:41:48 2020 +0200 MSForms: rerender form field button on zoom. Hide the button on zoom start and display it again with the new size on zoom end. Change-Id: If507009923e85225c8594252bd76033c8b84783b Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94407 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Tamás Zolnai <[email protected]> diff --git a/loleaflet/src/layer/FormFieldButtonLayer.js b/loleaflet/src/layer/FormFieldButtonLayer.js index fcd826c28..a8c268872 100644 --- a/loleaflet/src/layer/FormFieldButtonLayer.js +++ b/loleaflet/src/layer/FormFieldButtonLayer.js @@ -41,6 +41,9 @@ L.FormFieldButton = L.Layer.extend({ // Build list of items opened by clicking on the drop down button this._buildDropDownList(framePos, frameWidth, frameHeight); + + map.on('zoomstart', this._onZoomStart, this); + map.on('zoomend', this._onZoomEnd, this); }, _calculateButtonArea: function(map) { @@ -161,6 +164,16 @@ L.FormFieldButton = L.Layer.extend({ this.map._socket.sendMessage(message); }, + _onZoomStart: function() { + $('.drop-down-field-list').hide(); + this._clearButton(); + }, + + _onZoomEnd: function() { + // rebuild button on zoom + this.onAdd(this.map); + }, + _clearButton: function() { this.getPane('formfieldPane').innerHTML = ''; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
