Skip to content

Commit

Permalink
add all Nodes to screenViewRootNode, #249
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Oct 3, 2022
1 parent 20fbde0 commit f6031cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions js/macro/view/MacroScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class MacroScreenView extends ScreenView {
} );

// Parent for all nodes added to this screen
const rootNode = new Node( {
const screenViewRootNode = new Node( {
children: [
// nodes are rendered in this order
waterFluidNode,
Expand All @@ -139,7 +139,7 @@ export default class MacroScreenView extends ScreenView {
soluteListParent // last, so that combo box list is on top
]
} );
this.addChild( rootNode );
this.addChild( screenViewRootNode );

// Layout of nodes that don't have a position specified in the model
soluteComboBox.left = modelViewTransform.modelToViewX( model.beaker.left ) - 20; // anchor on left so it grows to the right during i18n
Expand Down
4 changes: 2 additions & 2 deletions js/micro/view/MicroScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default class MicroScreenView extends ScreenView {
} );

// Parent for all nodes added to this screen
const rootNode = new Node( {
const screenViewRootNode = new Node( {
children: [
// nodes are rendered in this order
waterFluidNode,
Expand All @@ -173,7 +173,7 @@ export default class MicroScreenView extends ScreenView {
soluteListParent // last, so that combo box list is on top
]
} );
this.addChild( rootNode );
this.addChild( screenViewRootNode );

// Layout of nodes that don't have a position specified in the model
moleculeCountNode.centerX = beakerNode.centerX;
Expand Down
4 changes: 2 additions & 2 deletions js/mysolution/view/MySolutionScreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default class MySolutionScreenView extends ScreenView {
} );

// Parent for all nodes added to this screen
const rootNode = new Node( {
const screenViewRootNode = new Node( {
children: [
solutionNode,
pHAccordionBox,
Expand All @@ -122,7 +122,7 @@ export default class MySolutionScreenView extends ScreenView {
resetAllButton
]
} );
this.addChild( rootNode );
this.addChild( screenViewRootNode );

// Layout of nodes that don't have a position specified in the model
pHAccordionBox.left = beakerNode.left;
Expand Down

0 comments on commit f6031cd

Please sign in to comment.