Use stationary interfaces for external connections
This commit is contained in:
parent
fda5361a2b
commit
41a528a49c
3 changed files with 171 additions and 69 deletions
|
|
@ -41,8 +41,8 @@ pub struct Connection {
|
|||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct LayoutInput {
|
||||
pub blocks: Vec<MacroBlock>,
|
||||
pub input: Vec<Interface>,
|
||||
pub output: Vec<Interface>,
|
||||
pub static_input: Vec<Interface>,
|
||||
pub static_output: Vec<Interface>,
|
||||
pub connections: Vec<Connection>,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ pub fn path_input_from_blocks_positions(
|
|||
.dir
|
||||
.transform(start_transform);
|
||||
} else {
|
||||
start_pos = input.output[c.startpoint].offset;
|
||||
start_dir = input.output[c.startpoint].dir;
|
||||
start_pos = input.static_output[c.startpoint].offset;
|
||||
start_dir = input.static_output[c.startpoint].dir;
|
||||
}
|
||||
let end_pos;
|
||||
let end_dir;
|
||||
|
|
@ -135,8 +135,8 @@ pub fn path_input_from_blocks_positions(
|
|||
.dir
|
||||
.transform(end_transform);
|
||||
} else {
|
||||
end_pos = input.input[c.endpoint].offset;
|
||||
end_dir = input.input[c.endpoint].dir;
|
||||
end_pos = input.static_input[c.endpoint].offset;
|
||||
end_dir = input.static_input[c.endpoint].dir;
|
||||
}
|
||||
|
||||
connections.push(Connection {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue