From 438bd982b00797c8f962b74b422e0fb4ce68f1e6 Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Mon, 12 Nov 2018 11:32:24 -0700 Subject: [PATCH] #107 factor out font constant Signed-off-by: Chris Malley --- js/common/GQConstants.js | 1 + js/standardform/view/NoRealRootsNode.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/common/GQConstants.js b/js/common/GQConstants.js index b3dd435c..ab545b10 100644 --- a/js/common/GQConstants.js +++ b/js/common/GQConstants.js @@ -82,6 +82,7 @@ define( require => { GRAPHED_EQUATION_FONT: new PhetFont( 18 ), INTERACTIVE_EQUATION_FONT: new PhetFont( 26 ), COORDINATES_FONT: new PhetFont( { size: 16, weight: 'bold' } ), + NO_REAL_ROOTS_FONT: new PhetFont( { size: 18, weight: 'bold' } ), // line widths INTERACTIVE_QUADRATIC_LINE_WIDTH: 4, diff --git a/js/standardform/view/NoRealRootsNode.js b/js/standardform/view/NoRealRootsNode.js index 032e477a..845580b2 100644 --- a/js/standardform/view/NoRealRootsNode.js +++ b/js/standardform/view/NoRealRootsNode.js @@ -12,9 +12,9 @@ define( require => { const Bounds2 = require( 'DOT/Bounds2' ); const DerivedProperty = require( 'AXON/DerivedProperty' ); const GQColors = require( 'GRAPHING_QUADRATICS/common/GQColors' ); + const GQConstants = require( 'GRAPHING_QUADRATICS/common/GQConstants' ); const graphingQuadratics = require( 'GRAPHING_QUADRATICS/graphingQuadratics' ); const Node = require( 'SCENERY/nodes/Node' ); - const PhetFont = require( 'SCENERY_PHET/PhetFont' ); const Rectangle = require( 'SCENERY/nodes/Rectangle' ); const Tandem = require( 'TANDEM/Tandem' ); const Text = require( 'SCENERY/nodes/Text' ); @@ -41,7 +41,7 @@ define( require => { }, options ); const textNode = new Text( noRealRootsString, { - font: new PhetFont( { size: 18, weight: 'bold' } ), + font: GQConstants.NO_REAL_ROOTS_FONT, fill: 'white', maxWidth: 300 // determined empirically } );