Commit Graph

125 Commits

Author SHA1 Message Date
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
Jenil Gogari
950bc935e6 select a step more precisely. 2013-05-14 19:44:21 +05:30
Bartek Szopka
edff5a08c1 release 0.5.3 2012-04-04 21:32:17 +00:00
Bartek Szopka
2da949ea18 stopped using transitionend event to provide more consistent impress:stepenter triggering even if there is no transition 2012-04-04 19:39:30 +00:00
Bartek Szopka
8949aae00e next version 2012-04-04 18:23:23 +00:00
Bartek Szopka
9e6b22dccc release 0.5.2 2012-03-31 19:46:42 +00:00
Bartek Szopka
c87d7dff48 finally some more descriptive comments in js 2012-03-31 19:44:15 +00:00
Bartek Szopka
de6c37949f next version in development 2012-03-28 18:14:00 +00:00
Bartek Szopka
d3ce5a8735 release 0.5.1 2012-03-21 08:13:35 +00:00
Bartek Szopka
c7f5771211 fixing clicking links on active steps 2012-03-21 08:05:18 +00:00
Bartek Szopka
88662339a9 release 0.5 2012-03-20 21:37:08 +00:00
Bartek Szopka
fb32cf1bdd only call enter and leave events when necessary 2012-03-19 20:21:01 +00:00
Bartek Szopka
b3d680eab4 lowercase event names to keep DOM events convention, with backbone-style impress: namespace - in courtesy of @medikoo 2012-03-18 20:15:46 +00:00
Bartek Szopka
b0c5644b47 "goto now accepts duration parameter" 2012-03-14 22:53:17 +00:00
Bartek Szopka
9d99c03392 "goto now accepts more types of parameters: numbers, id strings and DOM elements" 2012-03-14 22:06:57 +00:00
Bartek Szopka
1a21865ea6 "goto is back, bye bye ugly stepTo" 2012-03-14 20:44:04 +00:00
Bartek Szopka
b2ba0ee421 "more readable event names" 2012-03-12 23:43:59 +00:00