Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Howto: listen for view change event?

$
0
0

Hello.

I have a view, which is initialized via live data binding and depends on many different Map properties.

I need to implement custom scroll bar for my view (specifically, http://baijs.com/tinyscrollbar/). I need to trigger it's "update" API method manually every time when the height of my content is changed to re-draw scroll bar and adapt it to new content's height.

However with live data binding potentially any Map's property change could cause content height change. So instead of listening for every property change, which could change the height of the rendered view, I'm looking for the single event from view, which tells me, something is changed in. Is there a way to accomplish it?

P.S. I do not like to listen for changes on Map's root since there are a lot of additional properties in Map, which are changed but did not impact specific view.


Viewing all articles
Browse latest Browse all 3491

Trending Articles