10-13-2017 12:34
10-13-2017 12:34
Since there doesn't seem to be any support for horizontal scrolling or pagination, I've been trying to implement the functionality myself, but I get this exception when I try to dynamically set an element's position to a negative value: "Argument at index 0 is invalid: Value out of bounds for native type"
Example:
<!-- resources/index.gui -->
<svg>
<text id="foo">whatever</text>
</svg>
// app/index.js
import document from 'document'; let el = document.getElementById('foo'); el.x = 50; // OK el.x = -50; // Exception: Argument at index 0 is invalid: Value out of bounds for native type
The same exception occurs when trying to negatively position along the y axis.
Static negative positioning works fine, though:
<svg>
<text x="-50">whatever</text>
</svg>
Answered! Go to the Best Answer.
10-13-2017 13:23
10-13-2017 13:23
Does this error also get thrown when performing a translation? Rather than setting it offscreen, have you tried using min-x and using a transform to pull it on screen?
10-13-2017 13:23
10-13-2017 13:23
Does this error also get thrown when performing a translation? Rather than setting it offscreen, have you tried using min-x and using a transform to pull it on screen?
10-13-2017 13:25
10-13-2017 13:25
We're also working on correctly supporting the various types of values. 100%, -10, $-10 etc.
10-13-2017 14:31 - edited 10-13-2017 14:38
10-13-2017 14:31 - edited 10-13-2017 14:38
Thanks for the idea. I ended up dynamically triggering an <animate> element for the movable content, and it works great. The issue I raised is still a bug, but this is a good workaround that also happens to be the best solution for my particular use case.