-
Notifications
You must be signed in to change notification settings - Fork 25
Tips and Tricks
When playing the animation from a browser, you can right-click -> view image on the presentation. The name of the current background will appear in the URL bar of your browser. You can search for this name in your text editor to find which slide corresponds to this background image.
By default, Dahu generates the mouse animation before the new background. This works well if you click before taking a screenshot (e.g. click to open a menu, and take the screenshot with the menu open). Sometimes, you want the opposite.
Edit the presentation.dahu file:
- In the "action" part, swap the
"type": "move"and the"type": "appear",actions - Make sure you didn't mess up the comma (comma between actions, but comma after the last one)
- Swap the
"trigger"fields: the first should be"onClick"and the second"afterPrevious"
Tooltips can contain arbitrary HTML code, including links. For example:
{
"type": "tooltip",
"id": "s12-tip1",
"text": "End of presentation.<br /><a href=\\"..\\">Back to summary</a>",
"color": "#FFDDDD"
}Don't forget to escape the double-quotes (\"). If the link leaves the presentation, you may want to add target="_top", in case the presentation is called from an iframe.
A "Next" button, like the one at the bottom of the presentation, can be inserted in a tooltip, like this:
{
"type": "tooltip",
"id": "s5-tip3",
"text": "This is a button to continue: <button class=\\"next\\">Continue</button>",
"color": "#FFFFDD"
}Due to the anchor system, each action must have a very unique id. So if you add any action you have to take care that the ID you give to it is unique. There are mainly two solutions:
- Choose an ID for your action that is not a number. Indeed, the automatic ID system only give numbers as identifiers. This way, you are sure that an automatic ID will not override yours. Of course, you have to take care that your ID is still unique.
- Just act as the ID attribution system: you give to the new action the ID specified in the metadata (normally in the top of the file) as 'nextUniqueId' and you increment this value. This way you are sure that your ID will be unique.
None of these solutions are better than the other, it's your choice.
Of course, if you want to highlight an action, you can replace its ID for one of your choice, for example a more explicit string. If you want to, you can use the ID of an object as an action ID, there will be no conflict about that.
You can add html code into tooltips, so you can add images into your tooltips just by placing them in the img/ folder into your presentation folder, and add this code in the tooltip :
<img src="img/image.png" width="50" height="50">
Currently, if the JSon file contains a syntax error, the project fails to load. It should provide an error message in a popup, but the error trace on the output of Dahu may help too (on a terminal or ~/.xsession-error)
See Using Dahu with Xephyr (Full desktop in a nested window)