Use computed sizes for ViziaState

This commit is contained in:
Robbert van der Helm
2023-03-07 21:22:15 +01:00
parent 17a95e703f
commit f6041789cd
8 changed files with 78 additions and 41 deletions

View File

@@ -60,7 +60,7 @@ impl Model for Data {}
// Makes sense to also define this here, makes it a bit easier to keep track of
pub(crate) fn default_state() -> Arc<ViziaState> {
ViziaState::from_size(EDITOR_WIDTH, EDITOR_HEIGHT, false)
ViziaState::new(|| (EDITOR_WIDTH, EDITOR_HEIGHT))
}
pub(crate) fn create(editor_data: Data, editor_state: Arc<ViziaState>) -> Option<Box<dyn Editor>> {