forked from HEL/circuiteria
		
	adapted wire stubs with auto side detection
This commit is contained in:
		
							
								
								
									
										13
									
								
								src/util.typ
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/util.typ
									
									
									
									
									
								
							| @@ -73,4 +73,15 @@ | ||||
| #let valid-anchors = ( | ||||
|   "center", "north", "east", "west", "south", | ||||
|   "north-east", "north-west", "south-east", "south-west" | ||||
| ) | ||||
| ) | ||||
|  | ||||
| #let get-port-side(element, port) = { | ||||
|   for (side, ports) in element.ports { | ||||
|     for p in ports { | ||||
|       if p.id == port { | ||||
|         return side | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   panic("Unknown port " + port + " on element " + element.id) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user