mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-02 13:49:37 +02:00
Alana version 11.0.2-b.5, Updated calcIntersections allowing mouse coordinates
This commit is contained in:
@@ -188,12 +188,15 @@
|
||||
// };
|
||||
|
||||
const { svg } = await mermaid.render('the-id-of-the-svg', code, undefined, positions);
|
||||
// if (window?.calcIntersections) {
|
||||
// console.log('Intersections', window.calcIntersections(positions, 'T', 'U'));
|
||||
// } else {
|
||||
// console.error('calcIntersections not found');
|
||||
// }
|
||||
console.log(JSON.stringify(positions));
|
||||
if (window?.calcIntersections) {
|
||||
console.log(
|
||||
'Intersections',
|
||||
calcIntersections('T', undefined, positions.nodes['T'], { x: 200, y: 200 })
|
||||
);
|
||||
} else {
|
||||
console.error('calcIntersections not found');
|
||||
}
|
||||
// console.log(JSON.stringify(positions));
|
||||
const elem = document.querySelector('#diagram');
|
||||
elem.innerHTML = svg;
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user