Skip to content

Commit 5c6f3f6

Browse files
committed
Merge branch 'hotfix/1.0.9'
2 parents 220b8ba + 0033411 commit 5c6f3f6

File tree

6 files changed

+23
-18
lines changed

6 files changed

+23
-18
lines changed

CHANGELOG

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
= 1.0.8
1+
= 1.0.9
2+
* True fix for issue with lineWidth handling in stroke (#14)
3+
4+
= 1.0.8 (broken)
25
* Fix issue with lineWidth handling in stroke (#14)
36

47
= 1.0.7

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hidpi-canvas",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"homepage": "https://github.com/jondavidjohn/hidpi-canvas-polyfill",
55
"authors": [
66
"Jonathan Johnson <jon@crowdfavorite.com>"

dist/hidpi-canvas.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* HiDPI Canvas Polyfill (1.0.8)
2+
* HiDPI Canvas Polyfill (1.0.9)
33
*
44
* Author: Jonathan D. Johnson (http://jondavidjohn.com)
55
* Homepage: https://github.com/jondavidjohn/hidpi-canvas-polyfill
@@ -70,12 +70,13 @@
7070
});
7171

7272
// Stroke lineWidth adjustment
73-
prototype.stroke = (function(_super) {
74-
var args = Array.prototype.slice.call(arguments);
75-
this.lineWidth *= pixelRatio;
76-
_super.apply(this, args);
77-
this.lineWidth /= pixelRatio;
78-
})(prototype.stroke);
73+
prototype.stroke = (function(_super) {
74+
return function() {
75+
this.lineWidth *= pixelRatio;
76+
_super.apply(this, arguments);
77+
this.lineWidth /= pixelRatio;
78+
};
79+
})(prototype.stroke);
7980

8081
// Text
8182
//

dist/hidpi-canvas.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hidpi-canvas",
33
"description": "A JavaScript drop-in module to polyfill consistent and automatic HiDPI Canvas support.",
4-
"version": "1.0.8",
4+
"version": "1.0.9",
55
"license": "Apache 2.0",
66
"homepage": "https://github.com/jondavidjohn/hidpi-canvas-polyfill",
77
"bugs": "https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues",

src/CanvasRenderingContext2D.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,13 @@
6262
});
6363

6464
// Stroke lineWidth adjustment
65-
prototype.stroke = (function(_super) {
66-
var args = Array.prototype.slice.call(arguments);
67-
this.lineWidth *= pixelRatio;
68-
_super.apply(this, args);
69-
this.lineWidth /= pixelRatio;
70-
})(prototype.stroke);
65+
prototype.stroke = (function(_super) {
66+
return function() {
67+
this.lineWidth *= pixelRatio;
68+
_super.apply(this, arguments);
69+
this.lineWidth /= pixelRatio;
70+
};
71+
})(prototype.stroke);
7172

7273
// Text
7374
//

0 commit comments

Comments
 (0)