Skip to content

Commit d37aa4b

Browse files
authored
Fix loading bar only partially clearing previous draw
Depending on the canvas size, the loader would sometimes clear the entire bar, sometimes only part of it, and sometimes none of it. As a side note, clearing may not even be necessary in the first place, because the entire bar gets redrawn over the previous one anyway.
1 parent e283523 commit d37aa4b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/impact/loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ig.Loader = ig.Class.extend({
7070
var y = ig.system.height * 0.5-h/2;
7171

7272
ig.system.context.fillStyle = '#000';
73-
ig.system.context.fillRect( 0, 0, 480, 320 );
73+
ig.system.context.fillRect( 0, 0, ig.system.width, ig.system.height );
7474

7575
ig.system.context.fillStyle = '#fff';
7676
ig.system.context.fillRect( x*s, y*s, w*s, h*s );
@@ -98,4 +98,4 @@ ig.Loader = ig.Class.extend({
9898
}
9999
});
100100

101-
});
101+
});

0 commit comments

Comments
 (0)