</span></code></pre></div>
<p>Next, we check whether the cursor is over a stratum. We round the x-coordinate of the mouse cursor in data units to the nearest integer, then determine whether the x-coordinate is within <code>node_width/2</code> of that integer. If so, the mouse cursor is horizontally within the box.</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">hover</span> <span class="op">&lt;-</span> <span class="va">input</span><span cl