Commit graph

2 commits

Author SHA1 Message Date
EvB
05a92f4389 fix(js/onresize): make sync call async in angular
Wrap sync callback for the resize event in a `$timeout` so that it
gets called asyncronously. Fixes error where `$apply` was geting
called before previous `$apply` call finished. Angular allows only
one `$apply` call at a time.

See Angular.js reference.
> [Error: $rootScope:inprog](https://docs.angularjs.org/error/$rootScope/inprog)

Fixes:

> *Error* ldn/angular in O/<
> error[$rootScope:inprog] http://errors.angularjs.org/1.5.3/$rootScope/inprog?p0=%24digest

Likely fixes other errors we're seeing related to resize events
such as

> *ReferenceError<unknown module>* in onresize
> Can't find variable: tree
2016-12-21 16:39:35 -05:00
Joseph Schorr
9b87999c1c Code cleanup part #1: move all the services and directive JS code in the app.js file into its own files 2015-02-19 16:21:54 -05:00