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 ? endBindingElement
: null; : null;
const newLinearElementEditor = { const newLinearElementEditor: LinearElementEditor = {
...linearElementEditor, ...linearElementEditor,
selectedPointsIndices: newSelectedPointsIndices, selectedPointsIndices: newSelectedPointsIndices,
initialState: { initialState: {

View File

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

View File

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