Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport mobile wizard paragraph section fixes #8517

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion browser/src/control/Control.MobileWizardBuilder.js
Expand Up @@ -71,7 +71,6 @@ L.Control.MobileWizardBuilder = L.Control.JSDialogBuilder.extend({
var image = L.DomUtil.create('img', 'spinfieldimage', div);
var icon = (data.id === 'Transparency') ? builder._createIconURL('settransparency') : builder._createIconURL(data.id);
L.LOUtil.setImage(image, icon, builder.map);
image.src = icon;
icon.alt = '';
}

Expand Down
20 changes: 15 additions & 5 deletions browser/src/control/Control.MobileWizardWindow.js
Expand Up @@ -228,12 +228,12 @@ L.Control.MobileWizardWindow = L.Control.extend({

$('#mobile-wizard .ui-effects-placeholder').hide();

var nodesToHide = $(contentToShow).siblings().not('.mobile-wizard-scroll-indicator');
// do not select already hidden nodes at first place
var nodesToHide = $(contentToShow).siblings(':visible').not('.mobile-wizard-scroll-indicator');

var parent = $(contentToShow).parent();
if (parent.hasClass('toolbox'))
nodesToHide = nodesToHide.add(parent.siblings().not('.mobile-wizard-scroll-indicator'));

nodesToHide = nodesToHide.add(parent.siblings(':visible:not(.mobile-wizard-scroll-indicator)'));
var duration = 10;
if (animate) {
nodesToHide.hide('slide', { direction: 'left' }, duration);
Expand Down Expand Up @@ -299,13 +299,23 @@ L.Control.MobileWizardWindow = L.Control.extend({
this._customTitle ? this._setCustomTitle(this._customTitle) : this._setTitle(this._mainTitle);

var currentNode = $('.ui-explorable-entry.level-' + this._currentDepth + '.mobile-wizard:visible');
var headers = currentNode.siblings();
// select only those nodes which are updated on Level down
var headers = currentNode.siblings().filter(function() {
var styleAttributeValue = $(this).attr('style');
return styleAttributeValue && styleAttributeValue.includes('display: none;');
});
var currentHeader = currentNode.children('.ui-header');
headers = headers.add(currentHeader);

var parent = currentNode.parent();
if (parent.hasClass('toolbox'))
headers = headers.add(parent.siblings());
parent.siblings().each(function() {
var styleAttributeValue = $(this).attr('style');
// select only those nodes which are updated on Level down
if (styleAttributeValue && styleAttributeValue.includes('display: none;')) {
headers = headers.add($(this));
}
});

headers = headers.not('.hidden');

Expand Down