Skip to content

Commit

Permalink
Fixed bug when using autoclear false and retina
Browse files Browse the repository at this point in the history
  • Loading branch information
soulwire committed Dec 8, 2016
1 parent 2ec40d9 commit e09f6c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions js/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@
if ( context.retina ) {

context.save();
context.scale( ratio, ratio );

if (context.autoclear) {
context.scale( ratio, ratio );
}
}

if ( context.autoclear )
Expand Down Expand Up @@ -303,7 +306,7 @@

target.width = w + suffix;

if ( is2D && !context.autoclear )
if ( is2D && !context.autoclear && context.retina )

context.scale( ratio, ratio );

Expand Down
2 changes: 1 addition & 1 deletion js/sketch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sketch-js",
"version": "1.1.2",
"version": "1.1.3",
"description": "Cross-Platform JavaScript Creative Coding Framework",
"main": "./js/sketch.js",
"directories": {
Expand Down

0 comments on commit e09f6c5

Please sign in to comment.