[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

Pranam Lashkari (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 15 13:47:19 UTC 2020


 loleaflet/src/control/Control.MobileWizard.js |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 18d9de88f9c9d4813245bf1d156d5fd2722e6860
Author:     Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Thu Sep 10 07:17:43 2020 +0530
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Sep 15 15:46:59 2020 +0200

    leaflet: optimized the changing levels in wizard
    
    going up in wizards which has huge contect (i.e: function in calc)
    was very slow because animation performed on all the elements of the same class
    but needed to perform it on the sblings only
    
    Change-Id: I1db86492cc3ee7513efa44ccf08a0d15853364fd
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102350
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js
index 853dfe333..f5677ee73 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -178,7 +178,7 @@ L.Control.MobileWizard = L.Control.extend({
 			$('#mobile-wizard-tabs').hide();
 		}
 
-		var titles = '.ui-header.level-' + this.getCurrentLevel() + '.mobile-wizard';
+		var titles = '.ui-header.level-' + this.getCurrentLevel() + '.mobile-wizard:visible';
 
 		if (animate)
 			$(titles).hide('slide', { direction: 'left' }, 'fast');
@@ -227,11 +227,18 @@ L.Control.MobileWizard = L.Control.extend({
 			else
 				this._setTitle(this._mainTitle);
 
-			$('.ui-content.level-' + this._currentDepth + '.mobile-wizard').siblings().show('slide', { direction: 'left' }, 'fast');
-			$('.ui-content.level-' + this._currentDepth + '.mobile-wizard').hide();
+			var headers;
+			if (this._currentDepth === 0) {
+				headers = $('.ui-header.level-' + this._currentDepth + '.mobile-wizard');
+			} else {
+				headers = $('.ui-content.level-' + this._currentDepth + '.mobile-wizard:visible').siblings()
+					.not('.ui-content.level-' + this._currentDepth + '.mobile-wizard');
+			}
+
+			$('.ui-content.level-' + this._currentDepth + '.mobile-wizard:visible').hide();
 			$('#mobile-wizard.funcwizard div#mobile-wizard-content').removeClass('showHelpBG');
 			$('#mobile-wizard.funcwizard div#mobile-wizard-content').addClass('hideHelpBG');
-			$('.ui-header.level-' + this._currentDepth + '.mobile-wizard').show('slide', { direction: 'left' }, 'fast');
+			headers.show('slide', { direction: 'left' }, 'fast');
 
 			if (this._currentDepth == 0 || (this._isTabMode && this._currentDepth == 1)) {
 				this._inMainMenu = true;


More information about the Libreoffice-commits mailing list