push app
Browse files
app.py
CHANGED
|
@@ -106,7 +106,9 @@ if "img" in st.session_state:
|
|
| 106 |
if new_coord and new_coord not in st.session_state.coords_list:
|
| 107 |
is_close = False
|
| 108 |
for coord in st.session_state.coords_list:
|
| 109 |
-
|
|
|
|
|
|
|
| 110 |
is_close = True
|
| 111 |
break
|
| 112 |
if is_close:
|
|
|
|
| 106 |
if new_coord and new_coord not in st.session_state.coords_list:
|
| 107 |
is_close = False
|
| 108 |
for coord in st.session_state.coords_list:
|
| 109 |
+
existing = np.array([coord["x"], coord["y"]])
|
| 110 |
+
new = np.array([new_coord["x"], new_coord["y"]])
|
| 111 |
+
if np.linalg.norm(existing - new) < 10:
|
| 112 |
is_close = True
|
| 113 |
break
|
| 114 |
if is_close:
|