Skip to content

Commit 8143e85

Browse files
committed
Merge pull request hojberg#13 from burning-boots/master
Fixed being able to click through the arrow
2 parents 7675a88 + c2d57d9 commit 8143e85

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

public/js/lib/models/arrow.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ if (!('CSSArrowPlease' in window)) window.CSSArrowPlease = {};
6868
css += '\theight: 0;\n';
6969
css += '\twidth: 0;\n';
7070
css += '\tposition: absolute;\n';
71+
css += '\tpointer-events: none;\n';
7172

7273
css += '}\n';
7374

@@ -134,7 +135,7 @@ if (!('CSSArrowPlease' in window)) window.CSSArrowPlease = {};
134135
if (borderWidth > 0) {
135136
css = this._arrowCSS(
136137
this.get('borderColor'),
137-
this.get('size') + (borderWidth * 2),
138+
this.get('size') + (borderWidth * 1.41421356), // cos(PI/4) * 2
138139
'before'
139140
);
140141
}

public/js/spec/models/arrow_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ describe("CSSArrowPlease.Arrow", function () {
245245

246246
expect( arrow._arrowCSS ).toHaveBeenCalledWith(
247247
arrow.get('borderColor'),
248-
arrow.get('size') + (arrow.get('borderWidth') * 2),
248+
arrow.get('size') + (arrow.get('borderWidth') * 1.41421356),
249249
'before'
250250
);
251251
});

0 commit comments

Comments
 (0)