refactor(structure): move treemap to state
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
use tui::layout::Rect;
|
use tui::layout::Rect;
|
||||||
|
|
||||||
use crate::state::files::{FileOrFolder, Folder};
|
use crate::state::files::{FileOrFolder, Folder};
|
||||||
use crate::state::tiles::RectFloat;
|
use crate::state::tiles::{TreeMap, RectFloat};
|
||||||
use crate::ui::TreeMap;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum FileType {
|
pub enum FileType {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
pub mod board;
|
pub mod board;
|
||||||
pub mod rect_float;
|
pub mod rect_float;
|
||||||
|
pub mod treemap;
|
||||||
|
|
||||||
pub use board::*;
|
pub use board::*;
|
||||||
pub use rect_float::*;
|
pub use rect_float::*;
|
||||||
|
pub use treemap::*;
|
||||||
|
|||||||
@@ -9,14 +9,6 @@ pub struct RectFloat {
|
|||||||
pub height: f64,
|
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 {
|
impl RectFloat {
|
||||||
pub fn is_right_of(&self, other: &RectFloat) -> bool {
|
pub fn is_right_of(&self, other: &RectFloat) -> bool {
|
||||||
self.x >= other.x + other.width
|
self.x >= other.x + other.width
|
||||||
|
|||||||
@@ -5,13 +5,11 @@ mod title_line;
|
|||||||
mod bottom_line;
|
mod bottom_line;
|
||||||
mod message_box;
|
mod message_box;
|
||||||
mod display;
|
mod display;
|
||||||
mod treemap;
|
|
||||||
|
|
||||||
pub use rectangle_grid::*;
|
pub use rectangle_grid::*;
|
||||||
pub use display_size::*;
|
pub use display_size::*;
|
||||||
pub use title_line::*;
|
pub use title_line::*;
|
||||||
pub use bottom_line::*;
|
pub use bottom_line::*;
|
||||||
pub use display::*;
|
pub use display::*;
|
||||||
pub use treemap::*;
|
|
||||||
pub use draw_symbol::*;
|
pub use draw_symbol::*;
|
||||||
pub use message_box::*;
|
pub use message_box::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user