Coordinate anchoring for custom position: fixed cursor in Landscape Strip Mode #2665
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
this doesn't sound like a alphaTab problem, but a general browser problem. Within the alphaTab viewport you can get positions via But even if its not alphaTab specific: You should be able to solve this with reorganizing your DOM hierarchy. put alphaTab and your cursor into the same div. mark the wrapper as position: relative and the cursor to position: absolute.
https://jsfiddle.net/danielku15/mq1L7uv8/ overall it depends on your page layout. but instead of computing and positioning the cursor, you would lock the cursor via CSS inside the parent container. Then you ensure scrolling happens only on alphaTab which is "filling" the same container. There might be other/cleaner css tricks to achieve the same, but just quickly fiddled together this should match your needs. |
Beta Was this translation helpful? Give feedback.
this doesn't sound like a alphaTab problem, but a general browser problem. Within the alphaTab viewport you can get positions via
BoundsLookup, but to get the coordinate of the container element is logic outside of alphaTab. It surprises me that getBoundingClientRect doesn't work well in Safari, sounds like a bug on their side.But even if its not alphaTab specific: You should be able to solve this with reorganizing your DOM hierarchy. put alphaTab and your cursor into the same div. mark the wrapper as position: relative and the cursor to position: absolute.
position: absolutepositions elements relative to the next higherposition: relativecontainer. this way you stay within your wrappe…