Skip to content
This repository was archived by the owner on Dec 30, 2018. It is now read-only.

Commit f04d3a2

Browse files
committed
fix(app): column width is an integer
The columnWidth option has to be converted to an integer work with masonry.
1 parent 8e12fc2 commit f04d3a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/angular-masonry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
var attrOptions = scope.$eval(attrs.options);
105105
var options = angular.extend(attrOptions || {}, {
106106
itemSelector: attrs.itemSelector || '.masonry-brick',
107-
columnWidth: attrs.columnWidth
107+
columnWidth: parseInt(attrs.columnWidth, 10)
108108
});
109109
element.masonry(options);
110110

test/spec/directive.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe 'angular-masonry', ->
3131

3232
expect($.fn.masonry).toHaveBeenCalledOnce()
3333
call = $.fn.masonry.firstCall
34-
expect(call.args[0].columnWidth).toBe '200'
34+
expect(call.args[0].columnWidth).toBe 200
3535
)
3636

3737
it 'should pass on the item-selector attribute', inject(($compile) =>

0 commit comments

Comments
 (0)