Skip to content

Commit 9f927b9

Browse files
committed
allow no border
1 parent 4d752d9 commit 9f927b9

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

public/js/lib/models/arrow.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ if (!('CSSArrowPlease' in window)) window.CSSArrowPlease = {};
5858
css += '}\n';
5959
css += '.arrow_box:after';
6060

61-
if (hasBorder) css += ', .arrow_box:before {\n';
61+
if (hasBorder) css += ', .arrow_box:before {\n';
62+
else css += ' {\n';
6263

6364
css += '\t' + iPos +': 100%;\n';
6465

@@ -127,11 +128,18 @@ if (!('CSSArrowPlease' in window)) window.CSSArrowPlease = {};
127128
@protected
128129
**/
129130
_arrowBorderCSS: function () {
130-
return this._arrowCSS(
131-
this.get('borderColor'),
132-
this.get('size') + (this.get('borderWidth') * 2),
133-
'before'
134-
);
131+
var css = '',
132+
borderWidth = this.get('borderWidth');
133+
134+
if (borderWidth > 0) {
135+
css = this._arrowCSS(
136+
this.get('borderColor'),
137+
this.get('size') + (borderWidth * 2),
138+
'before'
139+
);
140+
}
141+
142+
return css;
135143
},
136144

137145
/**

0 commit comments

Comments
 (0)