I'm playing with making a drag and drop UI. Each person has a component that can be dragged into a position, and a reference to that position is saved in an associated position model. Multiple different positions will be posible, so it needs to be a seperate model.
As each person component is created, I want query the store to find the certain position, and then use this to set the absolute position of the component on the page.
I've tried querying the store to find the certain posiiton during the different lifecycle hooks, but the store doesn't seem to be available. When and where might it be possible to do this?
My other thought is that I should perhaps find the certain position for each student in the route's controller, and then pass these into the component, but I would really prefer to keep as much as possible within the component.
Aucun commentaire:
Enregistrer un commentaire