fix: regression on dragging a selected frame by its name (#8924)

fix hit element check for a selected frame's name
pull/8896/merge
Ryan Di 1 month ago committed by GitHub
parent d99e4a23ca
commit 606ac6c743
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5085,7 +5085,11 @@ class App extends React.Component<AppProps, AppState> {
isImageElement(element) ? 0 : this.getElementHitThreshold(), isImageElement(element) ? 0 : this.getElementHitThreshold(),
); );
return isPointInShape(pointFrom(x, y), selectionShape); // if hitting the bounding box, return early
// but if not, we should check for other cases as well (e.g. frame name)
if (isPointInShape(pointFrom(x, y), selectionShape)) {
return true;
}
} }
// take bound text element into consideration for hit collision as well // take bound text element into consideration for hit collision as well

Loading…
Cancel
Save