Commit Graph

141 Commits

Author SHA1 Message Date
Mohamed Feddad
203b85808c Add markdown dialect attribute. (#763)
Resolves #724
2020-04-01 10:08:27 +03:00
Henrik Ingo
99484d11b8 node build.js forgotten in a media plugin update
Fixes b7983887aa
2020-03-29 11:28:54 +03:00
Oliver Sanders
934c2266c4 substep: add substep-active class (#741) 2019-09-11 14:42:24 +03:00
Henrik Ingo
05cf6ffded rel: In teardown, only reset data-x/y/z attribute if we modified it.
Fixes downstream bug in impressionist:
https://github.com/henrikingo/impressionist/issues/20
2019-06-27 06:58:48 +03:00
Christoph Weiler
628b78f3fd Bugfix: Scaling bug on swipe, when window scale is not 1 (#736) 2019-06-13 13:27:27 +03:00
Will Soares
c61403d57a Trigger event on substep enter (#730) 2019-04-25 13:41:50 +03:00
Moritz
898083116b Update dependencies and remove outdated ones (#722)
* Update dependencies and remove outdated ones
* Add package lock file
* Add minified file
* Karma now uses headless browser to run QUnit
* Add to readme that node and npm install is required
* Update license info
* Add lint-new but don't use it in CI yet
2019-04-10 10:21:23 +03:00
Guilherme I F L Weizenmann
97546a5536 Add fullscreen with support to remote presentation controller (#712)
- F5 to enter/exit
- Escape to exit
2019-02-06 13:36:04 +02:00
Guilherme I F L Weizenmann
6db3f7c877 Add support for "." to enter/exit blackout screen (#716)
* 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
2019-02-06 13:25:11 +02:00
Guilherme I F L Weizenmann
6776a0dab7 Add pause and play events to autoplay (#713)
This is useful to request pause/resume from other plugins
2019-02-06 13:21:51 +02:00
Henrik Ingo
4d3adb09cd Fix form plugin for input fields.
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.
2019-01-01 21:40:46 +02:00
zilioti
65870699f4 Add keyup event for shift space previous slide (#706) 2018-10-22 11:18:53 -04:00
Henrik Ingo
194ae3bb62 Fixes to data-rel-to
Fixes 80ffff0e8f
2018-05-08 20:01:11 +03:00
Henrik Ingo
67079504b5 Run node build.js to update js/impress.js from previous commit 2018-05-08 19:18:07 +03:00
Holger Teichert
80ffff0e8f rel: Add relative positioning relative to any previous step. (#686) 2018-05-01 21:57:40 +03:00
Holger Teichert
c09ce88749 New plugin: media (#676)
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.
2018-03-17 16:33:34 +02:00
Henrik Ingo
e8394d0899 Remove beta label from version strings.
Also update Copyright / Author info in core module.
2018-03-09 10:23:25 +02:00
Jon Schlinkert
fbb17083d5 Fix condition in if statement for data-rotate-order
References #673
2018-03-04 13:58:41 +02:00
Henrik Ingo
e99a2df7f2 Fix typo 2018-01-07 18:46:36 +02:00
Henrik Ingo
4b5fe0fbf8 Set stopPropagation() event handlers for text input fields
Fixes #525 #140
2018-01-06 18:28:34 +02:00
Henrik Ingo
8b14eda98f Broader try-catch for handling impress-console-button disappearance (#652)
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.
2018-01-01 16:03:13 +02:00
Henrik Ingo
784a6d245b Also sync js/impress.js / Forgot to run node build.js 2018-01-01 15:32:16 +02:00
Henrik Ingo
729651dd5d Fix lint errors 2018-01-01 15:27:33 +02:00
Henrik Ingo
e92e02ccb4 Make impress-console-button actually clickable (#651)
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
2018-01-01 15:05:55 +02:00
Naja Melan
b86214c6e9 impressConsole: Don't put onclick inside style attribute (#652) 2018-01-01 12:54:55 +02:00
Henrik Ingo
df3532085f impressConsole broke init() if root element didn't have id="impress"
Also adds regression tests to prevent this from happening in the future
as well as upgrades karma-chrome-launcher to newest version.

Fixes #654
2017-12-31 14:36:43 +02:00
Henrik Ingo
d6c6cd47c2 Change gc.lib.addCallback to gc.lib.pushCallback (#626) 2017-11-05 18:42:27 +02:00
Henrik Ingo
2a8f784592 Bump version to 1.0.0-beta1 2017-11-05 18:42:27 +02:00
Henrik Ingo
443a4a82c1 Fix goto plugin: set lib variable from impress:init 2017-11-05 18:42:27 +02:00
Henrik Ingo
c9c1943f39 Update build.js to activate all the plugins added in previous commits
Also adds esversion:6 to .jshintrc. This is required by impressConsole.js.
2017-10-30 17:07:14 +02:00
Henrik Ingo
fd8bc69eb9 Add code comment that impress().swipe() is internal API method.
By internal, we mean it is not documented on DOCUMENTATION.md.
2017-10-23 22:29:59 +03:00
Henrik Ingo
b56b16d1cf Add support for data-rotate-order="xyz" attribute.
It turns out in CSS 3D, the order in which you specify for example
the rotateX(), rotateY() and rotateZ() transformations matter.
Each rotation is relative to the objects then-current position.
Impress.js being hardwired to always do rotateX->rotateY->rotateZ
was therefore limiting, and in fact there are some positions that
can never be reached with an xyz order. The new data-rotate-order=""
attribute allows to specify the order as a permutation of the 3
letters x, y, z, thus relaxing this limitation.

See http://openlife.cc/blogs/2016/october/3d-rotations-css-and-impressjs
for (much) more details.
2017-10-23 22:29:59 +03:00
Henrik Ingo
aa93a8b563 Support data-transition-duration attributes for step elements.
If the next element has its own data-transition-duration attribute,
use that value instead of the global setting.

References:
https://github.com/impress/impress.js/issues/142
2017-10-23 22:29:59 +03:00
Henrik Ingo
b15b07ef49 Trigger impress:steprefresh for every onStepEnter ( goto() )
Unlike impress:stepenter, we emit impress:steprefresh event also
when the "entered" step is the current step. This allows plugins
to reload or redraw objects if needed.

(Note that resize plugin already calls goto() on the active element
for similar purposes when it sees a window resize event. Emitting
impress:steprefresh allows other plugins to join in such a refresh,
and also others can call goto() if a refresh is needed.)
2017-10-23 22:29:59 +03:00
Kurt Zenisek
f0b99f81ac Add Mobile plugin, which allows authors to hide most slides with CSS.
The Mobile plugin adds CSS classes body.impress-mobile and
div.prev, div.next. These can be used in CSS to hide non-active
steps completely, in order to reduce memory consumption on
small mobile devices.
2017-10-23 22:29:59 +03:00
and3rson
b10f710499 Add swipe support for navigation between steps
Also:
 - Removes the code that allowed navigation by tapping left/right edge of screen.
   - Actually, this was already removed in this branch...
 - Removes the code that disabled impress.js on mobile devices
 - Adds new API call impress().swipe()

Refactored for the plugin api from this pull request by @and3rson:
https://github.com/impress/impress.js/pull/496

Manually "cherry picked" from
c44fd0f4c1
2017-10-23 22:29:59 +03:00
Henrik Ingo
10632c2ebc Add rel goto and skip plugins to build.js too 2017-10-21 14:31:56 +03:00
Henrik Ingo
5645849079 Small comment fixes from code review 2017-10-21 12:22:22 +03:00
Henrik Ingo
82ff7cbde0 Add a framework for synchronously executed preInit and preStepLeave plugins.
This allows plugins to register to be executed at the beginning of
impress().init() and impress().goto() respectively. By returning false,
a plugin can also cancel the event.

Also adds 3 plugins that use this: rel, goto and stop.
2017-10-21 12:22:22 +03:00
Henrik Ingo
f3d193d636 Move helper functions from core to src/lib/util.js
This facilitates them being used from plugins as well as core impress.js.
2017-10-05 17:57:16 +03:00
Henrik Ingo
9b958f0e00 Add a framework for libraries, and a first library gc
- Libraries are under src/lib/
- Added to build.js as usual, before plugins.
- See src/lib/README.md for details

gc library implements a "garbage collector" library, which allows
both the core and plugins to store elements and listeners to a list,
and when impress().lib.gc.teardown() is called, to have all of them
removed from the DOM. It also allows plugins to register their own
callback functions, which are called at teardown.

Commentary:

This work is based on copying the src/lib/gc.js from impressionist. While it was
useful, it turns out on the impress.js side there was much more a need to reset
attributes rather than delete elements. For now, this means lots of plugins do this
via their own lib.gc.addCallback() functions. Probably it would be nicer to add
some generic lib.gc.resetAttributes() functionality for this particular case.
I'll return to this in a future patch.

extras/ are not supported for impress().tear(). What can I say, they're extras.
Maybe in the future I'll support them, for now I can live without.
2017-10-05 14:57:59 +03:00
Henrik Ingo
ab30317cd0 Set browser:true in .jshintrc 2017-10-02 23:52:04 +03:00
Henrik Ingo
0dc8b43650 Introduce plugin framework
* Source files are under src/
* js/impress.js is now generated, but remains part of the repo (so it just works)
* npm run build
* build.js uses buildify node module
* Break out navigation and resize plugins from core src/impress.js file
2017-09-25 03:01:58 +03:00
Chad Whitacre
82bc45e6b0 Fix typo from 'arraify' to 'arrayify' (#595) 2016-11-02 23:36:31 +11:00
John-David Dalton
1bf05799a0 Breakout perspective for better IE11 support. (#594) 2016-10-28 16:46:25 -07:00
Chalk
20fe5189fb Corrected the version in the header (#591) 2016-10-28 23:00:46 +11:00
Fagner Brack
3f4eddeb6e Apply JSHint and JSCS with jQuery configs
Closes gh-535. Closes gh-529.
2016-04-16 16:55:49 +10:00
Anjaly Saju
d8995aa319 shift/meta key issue fixed 2016-02-03 14:19:37 +01:00
Simeon Visser
d33aad069b Fixed use of "were" 2014-08-18 14:10:41 +01:00
Bijan Himself
6cde43b056 Update impress.js
Fixed typo from "how thing work" to "how things work"
2013-07-26 10:34:43 -04:00