From e5d48ff5926761795518ccaf364e826edf86f4b6 Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Tue, 3 Apr 2012 13:17:19 +0100 Subject: [PATCH 1/3] Added CSS to remove pointer events for the pseudo element so you can click through --- public/js/lib/models/arrow.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/js/lib/models/arrow.js b/public/js/lib/models/arrow.js index 6155395..8c1ce55 100644 --- a/public/js/lib/models/arrow.js +++ b/public/js/lib/models/arrow.js @@ -68,6 +68,7 @@ if (!('CSSArrowPlease' in window)) window.CSSArrowPlease = {}; css += '\theight: 0;\n'; css += '\twidth: 0;\n'; css += '\tposition: absolute;\n'; + css += '\tpointer-events: none;\n'; css += '}\n'; From 54f6d8a44abd42d5abf68f151eaa6e973c4adcf4 Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Tue, 3 Apr 2012 13:31:56 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Fixed=20up=20the=20width=20of=20the=20arrow?= =?UTF-8?q?=20boarder.=20=20Is=20is=20a=2045=C2=B0=20width=20so=20must=20b?= =?UTF-8?q?e=20cos(PI/4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/lib/models/arrow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/lib/models/arrow.js b/public/js/lib/models/arrow.js index 8c1ce55..c3f7977 100644 --- a/public/js/lib/models/arrow.js +++ b/public/js/lib/models/arrow.js @@ -135,7 +135,7 @@ if (!('CSSArrowPlease' in window)) window.CSSArrowPlease = {}; if (borderWidth > 0) { css = this._arrowCSS( this.get('borderColor'), - this.get('size') + (borderWidth * 2), + this.get('size') + (borderWidth * 1.41421356), // cos(PI/4) * 2 'before' ); } From c2d57d95b3b06e28161a62dc793414f230afebb1 Mon Sep 17 00:00:00 2001 From: Matt Clarkson Date: Tue, 3 Apr 2012 15:20:36 +0100 Subject: [PATCH 3/3] Fixed up the arrow_spec with the correct arrow boarder calculation --- public/js/spec/models/arrow_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/spec/models/arrow_spec.js b/public/js/spec/models/arrow_spec.js index 11ec54a..feeb712 100644 --- a/public/js/spec/models/arrow_spec.js +++ b/public/js/spec/models/arrow_spec.js @@ -245,7 +245,7 @@ describe("CSSArrowPlease.Arrow", function () { expect( arrow._arrowCSS ).toHaveBeenCalledWith( arrow.get('borderColor'), - arrow.get('size') + (arrow.get('borderWidth') * 2), + arrow.get('size') + (arrow.get('borderWidth') * 1.41421356), 'before' ); });