refactor(structure): move treemap to state

This commit is contained in:
Aram Drevekenin
2020-05-05 19:29:45 +02:00
parent 41d48f576e
commit baeea0b19d
5 changed files with 3 additions and 12 deletions

View File

@@ -1,8 +1,7 @@
use tui::layout::Rect;
use crate::state::files::{FileOrFolder, Folder};
use crate::state::tiles::RectFloat;
use crate::ui::TreeMap;
use crate::state::tiles::{TreeMap, RectFloat};
#[derive(Clone, Debug)]
pub enum FileType {

View File

@@ -1,5 +1,7 @@
pub mod board;
pub mod rect_float;
pub mod treemap;
pub use board::*;
pub use rect_float::*;
pub use treemap::*;

View File

@@ -9,14 +9,6 @@ pub struct RectFloat {
pub height: f64,
}
// TODO: CONTINUE HERE (03/05) - just finished moving all the methods to RectFloat
// now we need to move RectFloat to a separate file
//
// might be best to create a "rectangles" or some such folder inside state and put
// tiles plus this new file in there... maybe also want to think of a new name for RectFloat?
//
// then keep looking here and see what we'd like to refactor... maybe keep breaking things away
// from RectangleGrid could be related?
impl RectFloat {
pub fn is_right_of(&self, other: &RectFloat) -> bool {
self.x >= other.x + other.width

View File

@@ -5,13 +5,11 @@ mod title_line;
mod bottom_line;
mod message_box;
mod display;
mod treemap;
pub use rectangle_grid::*;
pub use display_size::*;
pub use title_line::*;
pub use bottom_line::*;
pub use display::*;
pub use treemap::*;
pub use draw_symbol::*;
pub use message_box::*;