switch to mongodb, add drag&drop
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use pathfinding::prelude::dijkstra;
|
||||
use weblog::console_log;
|
||||
|
||||
pub struct Rect {
|
||||
pub width: u32,
|
||||
@@ -6,7 +7,8 @@ pub struct Rect {
|
||||
}
|
||||
|
||||
pub fn get_common_height(row: &[Rect], container_width: u32, margin: u32) -> f32 {
|
||||
let row_width: u32 = container_width - row.len() as u32 * (margin * 2);
|
||||
debug_assert!(container_width > (row.len() as u32) * (margin * 2));
|
||||
let row_width: u32 = container_width - (row.len() as u32) * (margin * 2);
|
||||
let total_aspect_ratio: f32 = row
|
||||
.iter()
|
||||
.map(|p| (p.width as f32) / (p.height as f32))
|
||||
|
||||
Reference in New Issue
Block a user