zk_html/diary/2012-10-08-09:26:41.html

37 lines
1.9 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html>
<head>
<title>Zk | 2012-10-08 09:26:41</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Gentium+Plus&family=Lato&family=Ubuntu+Monodisplay=swap" />
<link rel="stylesheet" type="text/css" href="/style.css?2024-05-04" />
<meta name="viewport" content="width=device-width" />
<meta charset="utf-8" />
</head>
<body>
<main>
<header>
<h1>Zk | 2012-10-08 09:26:41</h1>
</header>
<article class="content">
<p><span class="tag">blog</span> <span class="tag">fossil</span> <span class="tag">diary</span></p>
<p>A task at work had me pulling my hair out, but I finally got it, thankfully!  I figured it might also be a good idea to do a little write-up about it, and potentially do more about future items, just because they can sometimes be kind of interesting.</p>
<p>(drawing an edge between two vertices on a graph)</p>
<p>(rubberbanding pending edge)</p>
<p>(mouse events fire on containing elements in html, but also on covering elements (which  may not be contained) in svg, so mouse events can fire on the pending edge, because mousemove isn&rsquo;t fired all the time, so your cursor can wind up over the pending edge)</p>
<p>(solution for first part is, in theory, to use mouseenter and mouseleave instead of over and out)</p>
<p>(solution to the second part (and covering the first part) is to check if the cursor is within  the vertex)</p>
</article>
<footer>
<p>Page generated on Some SVG/mouse event oddities</p>
</footer>
</main>
<script type="text/javascript">
document.querySelectorAll('.tag').forEach(tag => {
let text = tag.innerText;
tag.innerText = '';
tag.innerHTML = `<a href="/tags.html#${text}">${text}</a>`;
});
</script>
</body>
</html>