rmallols / uxit

Experimenting Portals
1 stars 0 forks source link

onResize callback refactor #230

Open rmallols opened 10 years ago

rmallols commented 10 years ago

Right now, each app service can receive a callback called 'onResize'. This is weird as most tipically we're interested on use this callback inside of an existing layer (i.e. view or edit).

Consequently, we have to replace this mechanism with an event-driven one, that will broadcast an event from $rootScope that will be listened by whoever is interested on.

A second benefit of this mechanism is that it won't be necessary to send the callback to directives that are being invoked from apps (i.e. bannerApp -> bannerCanvas) so these directives could listen directly the event about without the need to receive the callback as an argument.