Clippy
This commit is contained in:
@@ -277,7 +277,7 @@ fn main() {
|
||||
let f = FrameView(f);
|
||||
for (&id, node) in &board.nodes {
|
||||
// Draw the node
|
||||
let Pos(x, y) = f.from_coords(node.x, node.y);
|
||||
let Pos(x, y) = f.inv_xform(node.x, node.y);
|
||||
if state.selected_node == Some(id) {
|
||||
set_draw_color(Color::Red);
|
||||
draw_text(&node.name, x, y);
|
||||
@@ -288,7 +288,7 @@ fn main() {
|
||||
// Draw edges
|
||||
for other_id in &node.edges {
|
||||
let other = board.nodes.get(other_id).unwrap();
|
||||
let Pos(x1, y1) = f.from_coords(other.x, other.y);
|
||||
let Pos(x1, y1) = f.inv_xform(other.x, other.y);
|
||||
draw_line(x, y, x1, y1);
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ fn main() {
|
||||
Event::Push => {
|
||||
let f = FrameView(f);
|
||||
let edit_mode = STATE.get().lock().unwrap().edit_mode;
|
||||
let coords = f.to_coords(Pos(app::event_x(), app::event_y()));
|
||||
let coords = f.xform(Pos(app::event_x(), app::event_y()));
|
||||
|
||||
match edit_mode {
|
||||
EditMode::Node => dispatch::node_press(coords),
|
||||
|
||||
Reference in New Issue
Block a user