mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-11-04 12:54:23 +01:00 
			
		
		
		
	fix: Do not allow resizing unbound elbow arrows either (#8333)
* Fix resizing of unbound elbow arrows
This commit is contained in:
		@@ -9660,7 +9660,12 @@ class App extends React.Component<AppProps, AppState> {
 | 
			
		||||
 | 
			
		||||
    const transformHandleType = pointerDownState.resize.handleType;
 | 
			
		||||
 | 
			
		||||
    if (selectedFrames.length > 0 && transformHandleType === "rotation") {
 | 
			
		||||
    if (
 | 
			
		||||
      // Frames cannot be rotated.
 | 
			
		||||
      (selectedFrames.length > 0 && transformHandleType === "rotation") ||
 | 
			
		||||
      // Elbow arrows cannot be transformed (resized or rotated).
 | 
			
		||||
      (selectedElements.length === 1 && isElbowArrow(selectedElements[0]))
 | 
			
		||||
    ) {
 | 
			
		||||
      return false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -441,15 +441,6 @@ export const resizeSingleElement = (
 | 
			
		||||
  pointerY: number,
 | 
			
		||||
  scene: Scene,
 | 
			
		||||
) => {
 | 
			
		||||
  // Elbow arrows cannot be resized when bound on either end
 | 
			
		||||
  if (
 | 
			
		||||
    isArrowElement(element) &&
 | 
			
		||||
    isElbowArrow(element) &&
 | 
			
		||||
    (element.startBinding || element.endBinding)
 | 
			
		||||
  ) {
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  const stateAtResizeStart = originalElements.get(element.id)!;
 | 
			
		||||
  // Gets bounds corners
 | 
			
		||||
  const [x1, y1, x2, y2] = getResizedElementAbsoluteCoords(
 | 
			
		||||
 
 | 
			
		||||
@@ -321,6 +321,7 @@ export const shouldShowBoundingBox = (
 | 
			
		||||
  }
 | 
			
		||||
  const element = elements[0];
 | 
			
		||||
  if (isElbowArrow(element)) {
 | 
			
		||||
    // Elbow arrows cannot be resized as single selected elements
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
  if (!isLinearElement(element)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user