I can drag and drop items into the canvas
I
This commit is contained in:
@@ -32,3 +32,33 @@ def post(session, _id: str, name: str, tab_boundaries: str):
|
||||
f"Entering {Routes.AddWorkflow} with args {debug_session(session)}, {_id=}, {name=}, {tab_boundaries=}")
|
||||
instance = InstanceManager.get(session, _id)
|
||||
return instance.show_workflow(name, json.loads(tab_boundaries))
|
||||
|
||||
|
||||
@rt(Routes.AddComponent)
|
||||
def post(session, _id: str, component_type: str, x: int, y: int):
|
||||
logger.debug(
|
||||
f"Entering {Routes.AddComponent} with args {debug_session(session)}, {_id=}, {component_type=}, {x=}, {y=}")
|
||||
instance = InstanceManager.get(session, _id)
|
||||
return instance.add_component(component_type, x, y)
|
||||
|
||||
@rt(Routes.MoveComponent)
|
||||
def post(session, _id: str, component_id: str, x: int, y: int):
|
||||
logger.debug(
|
||||
f"Entering {Routes.MoveComponent} with args {debug_session(session)}, {_id=}, {component_id=}, {x=}, {y=}")
|
||||
instance = InstanceManager.get(session, _id)
|
||||
return instance.move_component(component_id, x, y)
|
||||
|
||||
|
||||
@rt(Routes.DeleteComponent)
|
||||
def post(session, _id: str, component_id: str):
|
||||
logger.debug(
|
||||
f"Entering {Routes.DeleteComponent} with args {debug_session(session)}, {_id=}, {component_id=}")
|
||||
instance = InstanceManager.get(session, _id)
|
||||
return instance.delete_component(component_id)
|
||||
|
||||
@rt(Routes.AddConnection)
|
||||
def post(session, _id: str, from_id: str, to_id: str):
|
||||
logger.debug(
|
||||
f"Entering {Routes.AddConnection} with args {debug_session(session)}, {_id=}, {from_id=}, {to_id=}")
|
||||
instance = InstanceManager.get(session, _id)
|
||||
return instance.add_connection(from_id, to_id)
|
||||
Reference in New Issue
Block a user