In trying to add gutter into the options for the masonry today, I noticed that when setting "gutter" the whole module broke. This appears to be because of the way Masonry looks at strings rather than Ints, in your code you get the options via .fromJson which always returns a string.
I have put in a quick fix to my code, may be a better way but it works for me. If this is helpful to you then please run with it, great module btw.
//line 7...
var container = elem[0];
var options = angular.extend({
itemSelector: '.item'
}, angular.fromJson(attrs.masonry));
// NEW - check for int value options
angular.forEach(options, function(x, y){
if (!isNaN(x)) options[y] = parseInt(x);
});
var masonry = scope.masonry = new Masonry(container, options);
//line 19...
In trying to add gutter into the options for the masonry today, I noticed that when setting "gutter" the whole module broke. This appears to be because of the way Masonry looks at strings rather than Ints, in your code you get the options via .fromJson which always returns a string. I have put in a quick fix to my code, may be a better way but it works for me. If this is helpful to you then please run with it, great module btw.