Closed sharontabakman closed 4 years ago
Hi @sharontabakman, thank you for the comment.
Since you didn't show actual code, this is an estimate.
You added the line before the target elements are rendered. That is, the position of those element are not known.
Then, you have to call position
method when the target elements are rendered.
For example:
Reveal.addEventListener('slidechanged', function(event) {
if (event.indexh === 5) { // An index of the section that has the line is 5.
line.position();
}
});
Hi anseki!
Thank you for responding me but using- line.position();
does not help.
here is my code:
`<!doctype html>
`
As I've mentioned before, the arrow appears on the top left of the window and does not display correctly. For some reason when I remove the "section" from the code it works.. code without "section":
`<!doctype html>
`
There are some problems.
<section>
element for reveal.js. Otherwise reveal.js doesn't work.line
, you can't use that. You said that the position
method doesn't help but you didn't call the method in the first place. You can't reference the line
. You didn't define the variable x
also. That is, your code didn't work regardless of LeaderLine.fragmentshown
.<html>
element is missing.Anyway, as I said, the position
method solves this issue. For example:
https://jsfiddle.net/zu4mqgya/
Thank you for the help!! Your example helped me solve the issue between sections.
:smile:
Hi, I'm currently working with Reveal which is based on HTML and I would like to add leader-line to my presentation. Everything works till I'm adding to it.
For example with section:
For example without section:
Is there any simple solution for this issue?
HTML code:
JS code: var startElement = document.getElementById('op2'), endElement = document.getElementById('op1'); new LeaderLine(startElement, endElement, { color: 'red', size: 8 });