MCPcopy Create free account
hub / github.com/OpenGVLab/DragGAN / on_undo

Function on_undo

draggan/web.py:107–117  ·  view source on GitHub ↗
(points, image, state, size)

Source from the content-addressed store, hash-verified

105
106
107def on_undo(points, image, state, size):
108 image = state['img']
109
110 if len(points['target']) < len(points['handle']):
111 points['handle'] = points['handle'][:-1]
112 else:
113 points['handle'] = points['handle'][:-1]
114 points['target'] = points['target'][:-1]
115
116 image = add_points_to_image(image, points, size=SIZE_TO_CLICK_SIZE[size])
117 return points, image, False
118
119
120def on_change_model(selected, model):

Callers

nothing calls this directly

Calls 1

add_points_to_imageFunction · 0.70

Tested by

no test coverage detected