feat: hide point highlight when dragging

This commit is contained in:
dwelle
2025-11-12 22:31:22 +01:00
parent db8895ac16
commit 9c0e715cb8
3 changed files with 13 additions and 10 deletions

View File

@@ -630,7 +630,7 @@ export class LinearElementEditor {
? endBindingElement
: null;
const newLinearElementEditor = {
const newLinearElementEditor: LinearElementEditor = {
...linearElementEditor,
selectedPointsIndices: newSelectedPointsIndices,
initialState: {

View File

@@ -8911,6 +8911,7 @@ class App extends React.Component<AppProps, AppState> {
this.setState({
selectedLinearElement: {
...this.state.selectedLinearElement,
isDragging: true,
segmentMidPointHoveredCoords: ret.segmentMidPointHoveredCoords,
initialState: ret.initialState,
},

View File

@@ -1278,6 +1278,7 @@ const _renderInteractiveScene = ({
(el) => el.id === editor.elementId, // Don't forget bound text elements!
);
if (!appState.selectedLinearElement.isDragging) {
if (editor.segmentMidPointHoveredCoords) {
renderElbowArrowMidPointHighlight(context, appState);
} else if (
@@ -1289,6 +1290,7 @@ const _renderInteractiveScene = ({
renderLinearElementPointHighlight(context, appState, elementsMap);
}
}
}
// Paint selected elements
if (