Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <[email protected]>
  • Loading branch information
mxgrey committed Jun 6, 2024
1 parent 32bb7f9 commit 00101ec
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 17 additions & 10 deletions rmf_site_editor/src/site/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,23 @@ impl LoadSite {
pub fn blank_L1(name: String, default_file: Option<PathBuf>) -> Self {
let mut site = rmf_site_format::Site::default();
site.properties.name = NameOfSite(name);
site.levels.insert(1, Level::new(
LevelProperties {
name: NameInSite("L1".to_owned()),
elevation: LevelElevation(0.0),
..Default::default()
},
RankingsInLevel::default(),
));

Self { site, default_file, focus: true }
site.levels.insert(
1,
Level::new(
LevelProperties {
name: NameInSite("L1".to_owned()),
elevation: LevelElevation(0.0),
..Default::default()
},
RankingsInLevel::default(),
),
);

Self {
site,
default_file,
focus: true,
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions rmf_site_editor/src/widgets/view_levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

use crate::{
site::{
Category, Change, Delete, LevelElevation, LevelProperties, NameInSite,
DrawingMarker, FloorMarker,
Category, Change, Delete, DrawingMarker, FloorMarker, LevelElevation, LevelProperties,
NameInSite,
},
widgets::{AppEvents, Icons},
RecencyRanking,
Expand Down
12 changes: 6 additions & 6 deletions rmf_site_editor/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,19 @@ pub fn dispatch_load_workspace_events(
.map(|s| s.to_str().map(|s| s.to_owned()))
.flatten()
.unwrap_or_else(|| "blank".to_owned());
let data = WorkspaceData::LoadSite(
LoadSite::blank_L1(name, Some(file.clone()))
);
let data = WorkspaceData::LoadSite(LoadSite::blank_L1(
name,
Some(file.clone()),
));
sender.send(LoadWorkspaceFile(Some(file), data));
}
})
.detach();
}
#[cfg(target_arch = "wasm32")]
{
let data = WorkspaceData::LoadSite(
LoadSite::blank_L1("blank".to_owned(), None)
);
let data =
WorkspaceData::LoadSite(LoadSite::blank_L1("blank".to_owned(), None));
sender.send(LoadWorkspaceFile(None, data));
}
}
Expand Down

0 comments on commit 00101ec

Please sign in to comment.