The relative position in rel plugin is currently based on the world coordinate. So for the same effect, like fly in from the right-hand side, we must use different `data-rel-x/y/z` value. Why not let the plugin do the hard part?
So I introduce a `data-rel-position`, when set to `relative`, all relative attribute is based on the position and rotation of previous slide. So no matter the rotation of previous slide, data-rel-x="1000" always looks like fly in from the right-hand side. We can change the position and rotation of one slide, and the position of all following slides will be changed too.
When `data-rel-position` is set to `relative`, relative rotation has a clear meaning. It describes the relative rotations between slides. We don't need to set rotations for all slide, setting the key slides is enough. If `data-rel-position` is not relative, the effect of `data-rel-rotate-x/y/z` is not clear, so they're only used when `data-rel-position="relative"`.
After the introduction of relative rotation, there're 6 attribute that will inherit from previous slide. If we want to set a relative X move, we have to set all other 5 attributes to 0. It's boring. So a `data-rel-clear` is used to set all 6 attributes to 0, and then the value specified in current slide is applied.
The `examples/3D-positions/index.html` shows some usage. As you can see, the html code of two slide ring is the same, and slides except for the first two in a ring has no position attributes. It work by inheriting the previous one.
This PR invokes a lot math calculations. Basically, the rotation of a slide is translated into the coordinate describing the directions of X/Y/Z axes. And `data-rel-x/y/z` can be easily calculated by that. The rotations is the hard part, I mainly use the algorithm in the Quaternions and spatial rotation - Wikipedia to compose two and more rotations. I'm not a math guy, hope I don't make much mistakes.
The substep plugin currently shows each substep in the order in which
it appears in the HTML. This is not always an ideal fit for some
presentation styles, where it would be helpful to specify a different
order (e.g., to add annotations to an image).
This commit allows users to specify a custom order via the
`data-substep-order` attribute. Substeps without a
`data-substep-order` attribute are revealed last.
This commit also updates the Substep README to document the new
feature.
* Add support for "." to enter/exit blackout screen
- This is the default on Power Point
- THis add support for remote controller presentation blackout key
* Rename autoplay event call from resume to play
It turns out input[type=text] will only find input fields where
the type attribute is explicitly set to text, but would skip
fields that left it out and defaulted to type text. This changes
to catch all types of input elements.
The media plugin can autoplay and autopause/autostop <audio> and <video> elements when entering and leaving a step.
Support for impressConsole: don't autoplay in preview window and play but mute clips in current window.
The previous attempt at merely reading a property of event.target was
incorrect. It worked at first but errors reappeared later, so must
have been a reace.
This wraps the entire navigation event handlers in the try-catch, and
then checks for the very specific error and suppresses it. Other errors
are rethrown as is.
Changed the onclick handler to trigger the impress:console:open event
and not use the impressConsole() global function any more. The latter
is considered deprecated now that impressConsole is integrated into
impress.js itself.
Also catch some errors that appear in event handlers when the target
for the click event was immediately removed from DOM.
Fixes#651
The toolbar plugin produces a generic toolbar container, which then can contain
buttons, drop-downs or any html inside it. The user can position and otherwise
style the toolbar, and any widgets inside it will follow.
Other plugins that wish to expose graphical controls (navigation-ui, autoplay)
will use the impress:toolbar:appendChild event to 'send' their controls to
this plugin.
Originally from https://github.com/m42e/impress.js-progress and
adapted for the new plugin api. Also made the sample CSS produce
a smaller bar and font.
Adds event.detail.next to impress:stepleave event in impress.js.
navigation-ui plugin provides "back" and "forward" controls,
as well as a select drop down list to jump to any step. It is
added to act as an example of a UI plugin, meaning that it
exposes visible html elements.
(This plugin depends on the toolbar plugin, which is added 3 commits
from now.)
This commit adds a generic mouse-timeout plugin. (Same code was
originally part of toolbar plugin, but is now general purpose and
available to user to apply any CSS to it.)
Although this implementation is different and more generic, the
suggestion to add ability to hide mouse cursor came from
a pull request by Sebastian Clausen (@sclausen):
impress#536
The functionality is simple:
After 3 seconds of mouse inactivity, add the css class
`body.impress-mouse-timeout`. On `mousemove`, `click` or `touch`, remove the
class.
A user will then use (or not) his own CSS to hide whatever he wants to hide
after 3 seconds of mouse inactivity.