fix: set cursor to auto when not hovering a point on linear element (#9642)
* fix: set cursor to auto when not hovering a point on linear element #9628 * Simplify hover test for cursor * Add back comment * Fix test for hit testing --------- Co-authored-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
a7b64f02b3
commit
18808481fd
@ -28,7 +28,7 @@ describe("check rotated elements can be hit:", () => {
|
|||||||
//const p = [120, -211];
|
//const p = [120, -211];
|
||||||
//const p = [0, 13];
|
//const p = [0, 13];
|
||||||
const hit = hitElementItself({
|
const hit = hitElementItself({
|
||||||
point: pointFrom<GlobalPoint>(87, -68),
|
point: pointFrom<GlobalPoint>(88, -68),
|
||||||
element: window.h.elements[0],
|
element: window.h.elements[0],
|
||||||
threshold: 10,
|
threshold: 10,
|
||||||
elementsMap: window.h.scene.getNonDeletedElementsMap(),
|
elementsMap: window.h.scene.getNonDeletedElementsMap(),
|
||||||
|
@ -6147,7 +6147,10 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
setCursor(this.interactiveCanvas, CURSOR_TYPE.AUTO);
|
setCursor(this.interactiveCanvas, CURSOR_TYPE.AUTO);
|
||||||
} else if (isOverScrollBar) {
|
} else if (isOverScrollBar) {
|
||||||
setCursor(this.interactiveCanvas, CURSOR_TYPE.AUTO);
|
setCursor(this.interactiveCanvas, CURSOR_TYPE.AUTO);
|
||||||
} else if (this.state.selectedLinearElement) {
|
} else if (
|
||||||
|
this.state.selectedLinearElement &&
|
||||||
|
hitElement?.id === this.state.selectedLinearElement.elementId
|
||||||
|
) {
|
||||||
this.handleHoverSelectedLinearElement(
|
this.handleHoverSelectedLinearElement(
|
||||||
this.state.selectedLinearElement,
|
this.state.selectedLinearElement,
|
||||||
scenePointerX,
|
scenePointerX,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user