Cubism.js: The ruler does not exactly match the cursor (not in the right place)

My problem is that the ruler doesn’t exactly land on the cursor, as in the screenshot, and I'm not sure where to start looking to fix it.

enter image description here

Any tips?

+4
source share
1 answer

Positioning the absolute ruler in the div in which it is contained. So you need to make sure your div is free from any other style that might affect this.

For example, using boostrap, I had this problem when my horizon graph was in a grid array: go away silly offset

Change my cubism graph div from:

<div id="graph"></div> to

<div id="graph" style="position:relative" ></div>

Then the ruler moved to the desired position without affecting other styles on the page

horray, all fixed

Link to the github cubism page: https://github.com/square/cubism/issues/18

+1
source

Source: https://habr.com/ru/post/1497624/


All Articles