PhotoMosaic rewritten in AngularJS