]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Properly begin path before drawing line at edge of scale 1915/head
authorEvert Timberg <evert.timberg@gmail.com>
Tue, 19 Jan 2016 02:35:35 +0000 (21:35 -0500)
committerEvert Timberg <evert.timberg@gmail.com>
Tue, 19 Jan 2016 02:35:35 +0000 (21:35 -0500)
src/core/core.scale.js
test/scale.linear.tests.js

index e02e5157b2fe16e38d4ea5ac30c635d7349ae61b..721ea1f3a8fb6a2e976b26467b83f97c57ba2af5 100644 (file)
                                        x2 += helpers.aliasPixel(this.ctx.lineWidth);
                                }
 
+                               this.ctx.beginPath();
                                this.ctx.moveTo(x1, y1);
                                this.ctx.lineTo(x2, y2);
                                this.ctx.stroke();
index 2d2cdb3dd4516babee79954dde8ef1c813e2f36a..9f093ce6887d1dea0b4a18f95778965cec223ca6 100644 (file)
@@ -1026,6 +1026,9 @@ describe('Linear Scale', function() {
                }, {
                        "name": "setStrokeStyle",
                        "args": ["rgba(0, 0, 0, 0.1)"]
+               }, {
+                       "name": "beginPath",
+                       "args": []
                }, {
                        "name": "moveTo",
                        "args": [0, 100.5]
@@ -1099,6 +1102,9 @@ describe('Linear Scale', function() {
                }, {
                        "name": "setStrokeStyle",
                        "args": ["rgba(0, 0, 0, 0.1)"]
+               }, {
+                       "name": "beginPath",
+                       "args": []
                }, {
                        "name": "moveTo",
                        "args": [0, 100.5]
@@ -1558,6 +1564,9 @@ describe('Linear Scale', function() {
                }, {
                        "name": "setStrokeStyle",
                        "args": ["rgba(0, 0, 0, 0.1)"]
+               }, {
+                       "name": "beginPath",
+                       "args": []
                }, {
                        "name": "moveTo",
                        "args": [30.5, 0]
@@ -1689,6 +1698,9 @@ describe('Linear Scale', function() {
                }, {
                        "name": "setStrokeStyle",
                        "args": ["rgba(0, 0, 0, 0.1)"]
+               }, {
+                       "name": "beginPath",
+                       "args": []
                }, {
                        "name": "moveTo",
                        "args": [30.5, 0]
@@ -1946,6 +1958,9 @@ describe('Linear Scale', function() {
                }, {
                        "name": "setStrokeStyle",
                        "args": ["rgba(0, 0, 0, 0.1)"]
+               }, {
+                       "name": "beginPath",
+                       "args": []
                }, {
                        "name": "moveTo",
                        "args": [30.5, 0]