hope you're all doing well :)
This is not really a coding question, but more of a 'where do you put the code' question...
I am using Famo.us and building an application that comprises of a number of child Views. A quick description of the approach would be:
-mainFile
Creates the Famo.us Context
Creates new Widget() object and adds it to the Context
Backend stuff
-Widget file (Application Object)
Creates Layout
Creates Views
Creates Menu
Creates 'Click' Listeners for Views surfaces and containers within
-Views (various) - various Views (ScrollViews, ContainerSurfaces, Famous-Flex)
Creates inner Views and Surfaces
I want to start adding Mouse and Touch controls...My question is: Where in the hierarchy do you add the code to handle the Touch Events and Mouse Events?
There will be internal ScrollViews, ContainerSurfaces, FlexScrollViews, Views, Surfaces and ImageSurfaces. Some will be scrolled, 'flicked through' or draggable. 'Clicks' are sorted :)
Do I add all the code for Touch Events with each individual View, or at the level I create the Context, or 'Application Object' level? Or is there somewhere else?
All the examples show the code in the same code file as the Surface in the example - yet there are no 'complicated' examples, so wondering Best Practice for the placement of the code to handle Touch and Mouse Events.
Really appreciate your help - hope you are all looking forward to the weekend :)
Thanks again :)