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

Commit

Permalink
fix(app): column width is an integer
Browse files Browse the repository at this point in the history
The columnWidth option has to be converted to an integer work with masonry.
  • Loading branch information
passy committed Jul 29, 2013
1 parent 8e12fc2 commit f04d3a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/angular-masonry.js
Expand Up @@ -104,7 +104,7 @@
var attrOptions = scope.$eval(attrs.options);
var options = angular.extend(attrOptions || {}, {
itemSelector: attrs.itemSelector || '.masonry-brick',
columnWidth: attrs.columnWidth
columnWidth: parseInt(attrs.columnWidth, 10)
});
element.masonry(options);

Expand Down
2 changes: 1 addition & 1 deletion test/spec/directive.coffee
Expand Up @@ -31,7 +31,7 @@ describe 'angular-masonry', ->

expect($.fn.masonry).toHaveBeenCalledOnce()
call = $.fn.masonry.firstCall
expect(call.args[0].columnWidth).toBe '200'
expect(call.args[0].columnWidth).toBe 200
)

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

0 comments on commit f04d3a2

Please sign in to comment.