From 9b6b228524f14bf65ba60aaf3d0993c8ec5bff2d Mon Sep 17 00:00:00 2001 From: Pushkar Joshi Date: Tue, 7 Feb 2012 15:22:11 -0800 Subject: some minor bug fixes and code cleanup --- js/helper-classes/RDGE/GLSubpath.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'js/helper-classes/RDGE/GLSubpath.js') diff --git a/js/helper-classes/RDGE/GLSubpath.js b/js/helper-classes/RDGE/GLSubpath.js index 74134a7e..383194d4 100644 --- a/js/helper-classes/RDGE/GLSubpath.js +++ b/js/helper-classes/RDGE/GLSubpath.js @@ -146,6 +146,8 @@ function GLSubpath() { ctx.lineCap = lineCap[1]; ctx.beginPath(); + /* + commenting this out for now because of Chrome bug where coincident endpoints of bezier curve cause the curve to not be rendered var prevAnchor = this.getAnchor(0); ctx.moveTo(prevAnchor.getPosX()-bboxMin[0],prevAnchor.getPosY()-bboxMin[1]); for (var i = 1; i < numAnchors; i++) { @@ -157,18 +159,19 @@ function GLSubpath() { var currAnchor = this.getAnchor(0); ctx.bezierCurveTo(prevAnchor.getNextX()-bboxMin[0],prevAnchor.getNextY()-bboxMin[1], currAnchor.getPrevX()-bboxMin[0], currAnchor.getPrevY()-bboxMin[1], currAnchor.getPosX()-bboxMin[0], currAnchor.getPosY()-bboxMin[1]); prevAnchor = currAnchor; - } - if (this._isClosed){ ctx.fill(); } + */ - /* var numPoints = this._samples.length/3; - ctx.moveTo(this._samples[0],this._samples[1]); + ctx.moveTo(this._samples[0]-bboxMin[0],this._samples[1]-bboxMin[1]); for (var i=0;i