ref(event): split resize event into viewport and size event
Viewport event reflects the absolut position and size of a given container (and propagates them to its children). While the size event propagates the content size to its children (and sets their corresponding member values accordingly). Both events are currently only emitted by `Container`s meaning that they don't need to be part of the event loop and that they might be removed later.
This commit is contained in:
11
README.md
11
README.md
@@ -108,6 +108,17 @@ cells of the content (and may be overwritten by child elements contents).
|
||||
The border of an element should be around independent of the scrolling of the
|
||||
contents, just like padding.
|
||||
|
||||
### Positioning and Rendering
|
||||
|
||||
I need to find a way to render the contents of each container independently on the screen. Currently the application has two (yet still married) sizes which it keeps track of:
|
||||
|
||||
- **viewport**: The `Size` of the content on screen. It contains the information about the location (*anchor*) where on the screen and the size of the content to show.
|
||||
- **size**: The actual size of the contents for a given container. This `Size` does contain information about the total content size (rows & cols which may not be equal to the screen space available (i.e. the *viewport*)) and the current *anchor* for the viewport of the contents.
|
||||
|
||||
Manipulating the *size* of a container has implications on the *viewport* of the child elements which actually causes problems when enlarging containers (children lose correct screen location information).
|
||||
|
||||
Should I split the *anchor* and the *size* information from another?
|
||||
|
||||
### Input
|
||||
|
||||
How is the user input handled in the containers? Should there be active
|
||||
|
||||
Reference in New Issue
Block a user