Merge "Don't access the stacklayout directly"

This commit is contained in:
jenkins-bot 2022-07-12 11:36:02 +00:00 committed by Gerrit Code Review
commit 4eebfd2635
3 changed files with 11 additions and 2 deletions

View file

@ -74,7 +74,7 @@ ve.ui.MWTemplateDialog.prototype.getReadyProcess = function ( data ) {
this.bookletLayout.focus();
}
this.bookletLayout.stackLayout.getItems().forEach( function ( page ) {
this.bookletLayout.getPagesOrdered().forEach( function ( page ) {
if ( page instanceof ve.ui.MWParameterPage ) {
page.updateSize();
}

View file

@ -586,7 +586,7 @@ ve.ui.MWTransclusionDialog.prototype.onWindowResize = function () {
if ( this.transclusionModel ) {
this.autoExpandSidebar();
this.bookletLayout.stackLayout.getItems().forEach( function ( page ) {
this.bookletLayout.getPagesOrdered().forEach( function ( page ) {
if ( page instanceof ve.ui.MWParameterPage ) {
page.updateSize();
}

View file

@ -208,6 +208,15 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getOutlineControls = function
return this.outlineControlsWidget;
};
/**
* Get the list of pages on the stack ordered by appearance.
*
* @return {OO.ui.PageLayout[]}
*/
ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getPagesOrdered = function () {
return this.stackLayout.getItems();
};
/**
* Get a page by its symbolic name.
*