joint.all.js
function(elements, dimension) {

	return _.reduce(elements, function(max, el) { return Math.max(el.get('size')[dimension], max); }, 0);
    }
function(elements, dimension) {

	return _.reduce(elements, function(max, el) { return Math.max(el.get('size')[dimension], max); }, 0);
    }
find maximal dimension (width/height) in an array of the elements