Skip to content

Commit

Permalink
Fixed truncation and centering of the loading bar, see #400
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 10, 2017
1 parent d13eac5 commit c91fa8c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/splash.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@
progressBarDiv.style.display = 'block';

var svg = document.createElementNS( XML_NAMESPACE, 'svg' );
svg.style[ 'margin-left' ] = '-1px'; // compensates for the offset of x=1
var progressBarBackground = document.createElementNS( XML_NAMESPACE, 'rect' );
progressBarBackground.setAttribute( 'x', '0' );
progressBarBackground.setAttribute( 'x', '1' ); // prevent clipping on the left side, see https://github.com/phetsims/joist/issues/400
progressBarBackground.setAttribute( 'y', PROGRESS_BAR_Y );
progressBarBackground.setAttribute( 'width', '273' );
progressBarBackground.setAttribute( 'height', '10' );
Expand All @@ -99,7 +100,7 @@
// the startup sequence in Sim.js
var progressBarForeground = document.createElementNS( XML_NAMESPACE, 'rect' );
progressBarForeground.setAttribute( 'id', 'progressBarForeground' );
progressBarForeground.setAttribute( 'x', '0' );
progressBarForeground.setAttribute( 'x', '1' ); // prevent clipping on the left side, see https://github.com/phetsims/joist/issues/400
progressBarForeground.setAttribute( 'y', PROGRESS_BAR_Y );
progressBarForeground.setAttribute( 'width', '0' );
progressBarForeground.setAttribute( 'height', '10' );
Expand Down

0 comments on commit c91fa8c

Please sign in to comment.