From ddbbac57fdbc6d24b3c17eb402aed66a61fc88e4 Mon Sep 17 00:00:00 2001 From: denz1994 Date: Mon, 27 Jan 2020 15:37:59 -0500 Subject: [PATCH] More adjustments to homeScreen/nav-bar icons https://github.com/phetsims/build-a-molecule/issues/139 and https://github.com/phetsims/build-a-molecule/issues/55 --- js/multiple/MultipleScreen.js | 4 ++-- js/playground/PlaygroundScreen.js | 5 +++-- js/single/SingleScreen.js | 7 +++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/js/multiple/MultipleScreen.js b/js/multiple/MultipleScreen.js index a239bdc6..1306a2bc 100644 --- a/js/multiple/MultipleScreen.js +++ b/js/multiple/MultipleScreen.js @@ -57,8 +57,8 @@ define( require => { wrapperNode.addChild( moleculeIconTwo ); // Adjust the position of the molecule icons. - moleculeIconOne.center = wrapperNode.center.minusXY( 250, 100 ); - moleculeIconTwo.center = wrapperNode.center.minusXY( 0, 100 ); + moleculeIconOne.center = wrapperNode.center.minusXY( 270, 85 ); + moleculeIconTwo.center = wrapperNode.center.minusXY( 5, 85 ); const options = { name: titleMultipleString, homeScreenIcon: wrapperNode diff --git a/js/playground/PlaygroundScreen.js b/js/playground/PlaygroundScreen.js index b021b34a..3b51d964 100644 --- a/js/playground/PlaygroundScreen.js +++ b/js/playground/PlaygroundScreen.js @@ -41,11 +41,12 @@ define( require => { moleculeNode.transformMolecule( transformMatrix ); } moleculeNode.draw(); - const node = new Image( moleculeNode.canvas.toDataURL() ); + const moleculeIcon = new Image( moleculeNode.canvas.toDataURL() ); const wrapperNode = new Rectangle( 0, 0, 548, 373, { fill: BAMConstants.CANVAS_BACKGROUND_COLOR } ); - wrapperNode.addChild( node ); + wrapperNode.addChild( moleculeIcon ); + moleculeIcon.center = wrapperNode.center.minusXY( 275, 185 ); const options = { name: titlePlaygroundString, diff --git a/js/single/SingleScreen.js b/js/single/SingleScreen.js index 4323a474..535b014c 100644 --- a/js/single/SingleScreen.js +++ b/js/single/SingleScreen.js @@ -42,11 +42,14 @@ define( require => { moleculeNode.transformMolecule( transformMatrix ); } moleculeNode.draw(); - const node = new Image( moleculeNode.canvas.toDataURL() ); + const moleculeIcon = new Image( moleculeNode.canvas.toDataURL(), { scale: .85 } ); const wrapperNode = new Rectangle( 0, 0, 548, 373, { fill: BAMConstants.CANVAS_BACKGROUND_COLOR } ); - wrapperNode.addChild( node ); + wrapperNode.addChild( moleculeIcon ); + + // Adjust the position of the molecule icons. + moleculeIcon.center = wrapperNode.center.minusXY( 240, 140 ); const options = { name: titleSingleString,