This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
[Bug]: Using graph.findModelsUnderElement(cell) with lables positioned outside the rectangle cell #2405
Labels
You can continue the conversation there. Go to discussion →
What happened?
Hello,
we are using jointjs+ and I have one scenario where while dragging I am validating where the cell should avoid overlapping.
I have taken code reference from validators.js from planogram demo app of yours.
Now it is working fine in general with below code
But I have some labels which is positioned outside of my custom element. In this case the graph.findModelsUnderElement(cell).length > 0; is not able to detect overlapping models under it as only labels touching the other cells.
![image](https://private-user-images.githubusercontent.com/22453886/285416860-4b84b167-fc8b-4a51-ad45-aac01d2057ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExMzg3MzksIm5iZiI6MTcyMTEzODQzOSwicGF0aCI6Ii8yMjQ1Mzg4Ni8yODU0MTY4NjAtNGI4NGIxNjctZmM4Yi00YTUxLWFkNDUtYWFjMDFkMjA1N2VmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE2VDE0MDAzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWY3MDg2ZWVhMTQwYmZlNzc2OTI5MzBmMWEzODViM2QzYzdiMDMzMjJlNjI3MzFmNjQ2ZDc2NjFiMzdmZWM3NDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.eVEPn-7PP5uPqcMfAkOQWFGwsF4xAHrAr5H7N2OWy5M)
Please refer to the below image where label of second rect is overlapping to the first rectangle.
Any suggestion you can give to handle the situation.
Version
3.7
What browsers are you seeing the problem on?
Firefox, Chrome, Android (State browser in description)
What operating system are you seeing the problem on?
Linux
The text was updated successfully, but these errors were encountered: