mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
don't update points unitil deselected
This commit is contained in:
parent
3487f0ab26
commit
9b5715623a
5 changed files with 44 additions and 15 deletions
|
@ -165,6 +165,9 @@ const renderSingleLinearPoint = (
|
|||
isSelected: boolean,
|
||||
isPhantomPoint = false,
|
||||
) => {
|
||||
if (!point) {
|
||||
return;
|
||||
}
|
||||
context.strokeStyle = "#5e5ad8";
|
||||
context.setLineDash([]);
|
||||
context.fillStyle = "rgba(255, 255, 255, 0.9)";
|
||||
|
@ -207,10 +210,9 @@ const renderLinearPointHandles = (
|
|||
? POINT_HANDLE_SIZE
|
||||
: POINT_HANDLE_SIZE / 2;
|
||||
|
||||
const visiblePointIndexes = LinearElementEditor.getVisiblePointIndexes(
|
||||
appState.selectedLinearElement,
|
||||
appState,
|
||||
);
|
||||
const visiblePointIndexes =
|
||||
appState.editingLinearElement?.visiblePointIndexes ||
|
||||
appState.selectedLinearElement.visiblePointIndexes;
|
||||
visiblePointIndexes.forEach((index) => {
|
||||
const isSelected =
|
||||
!!appState.editingLinearElement?.selectedPointsIndices?.includes(index);
|
||||
|
@ -436,10 +438,9 @@ export const _renderScene = ({
|
|||
appState.selectedLinearElement &&
|
||||
appState.selectedLinearElement.hoverPointIndex >= 0
|
||||
) {
|
||||
const visiblePointIndexes = LinearElementEditor.getVisiblePointIndexes(
|
||||
appState.selectedLinearElement,
|
||||
appState,
|
||||
);
|
||||
const visiblePointIndexes =
|
||||
appState.editingLinearElement?.visiblePointIndexes ||
|
||||
appState.selectedLinearElement.visiblePointIndexes;
|
||||
if (
|
||||
visiblePointIndexes.includes(
|
||||
appState.selectedLinearElement.hoverPointIndex,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue