Skip to content

Commit

Permalink
Fix navigator
Browse files Browse the repository at this point in the history
  • Loading branch information
farmaazon committed Jun 17, 2022
1 parent 18ef670 commit 44efffb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/gui/view/src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use ensogl::application;
use ensogl::application::shortcut;
use ensogl::application::Application;
use ensogl::display;
use ensogl::display::navigation::navigator::Navigator;
use ensogl::display::Scene;
use ensogl::system::web;
use ensogl::system::web::dom;
Expand Down Expand Up @@ -156,6 +157,12 @@ impl SearcherVariant {
}
}

fn set_navigator(&self, navigator: Navigator) {
if let Self::ComponentBrowser(browser) = self {
browser.model().list.model().set_navigator(Some(navigator))
}
}

fn frp(&self, project_view_network: &frp::Network) -> SearcherFrp {
match self {
SearcherVariant::ComponentBrowser(view) => {
Expand Down Expand Up @@ -261,6 +268,7 @@ impl Model {
let display_object = display::object::Instance::new(&logger);
let searcher = SearcherVariant::new(app);
let graph_editor = app.new_view::<GraphEditor>();
searcher.set_navigator(graph_editor.model.navigator.clone_ref());
let code_editor = app.new_view::<code_editor::View>();
let fullscreen_vis = default();
let prompt_background = prompt_background::View::new(&logger);
Expand Down

0 comments on commit 44efffb

Please sign in to comment.