Commit Graph

154 Commits

Author SHA1 Message Date
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
Bartek Szopka
c64d9fbf97 "added impress-enabled and impress-disabled CSS classes used in impress initialization" 2012-03-12 22:57:58 +00:00
Bartek Szopka
e06cda174e "cleaning the code after init refactoring" 2012-03-12 22:48:33 +00:00
Bartek Szopka
a055e97a54 "navigation handlers are now added when impress is initialized" 2012-03-12 22:29:45 +00:00
Bartek Szopka
70bc3b737b "impressive API update - added initialization init function and event" 2012-03-12 21:51:07 +00:00
Bartek Szopka
8220ab9393 "merge with master branch (release 0.4.1)" 2012-03-11 19:59:02 +00:00
Bartek Szopka
b59a4bf4d7 "bugfix release 0.4.1" 2012-03-11 09:15:35 +00:00
Bartek Szopka
78f2ce657c "fallback mode fix" 2012-03-11 09:10:36 +00:00
Bartek Szopka
5fd0f58fc6 "present and past can't appear together on element" 2012-03-10 23:14:40 +00:00
Bartek Szopka
b23506e885 "past, present and future classes on step elements" 2012-03-10 23:06:48 +00:00
Bartek Szopka
b0a139ef81 "removed unnecessary transitions and jumpiness when presentation starts" 2012-03-10 22:51:20 +00:00
Bartek Szopka
1bbf205bc7 "added impressive events when step is entered and left, triggered by transition end" 2012-03-10 22:36:08 +00:00
Bartek Szopka
2f677e1292 "next version in development" 2012-03-10 20:22:32 +00:00
Bartek Szopka
6314e2e150 "release 0.4" 2012-03-10 19:55:40 +00:00
Bartek Szopka
2b58f53708 "making jshint even more happy with custom config" 2012-03-10 19:18:01 +00:00
Bartek Szopka
a20c50db25 "making jshint (almost) happy" 2012-03-10 18:26:12 +00:00
Bartek Szopka
9d495abba7 impressive class names refactoring 2012-03-10 15:39:22 +01:00
Bartek Szopka
207c823a69 goto is a future reserved word, so API method is renamed to stepTo 2012-03-10 12:20:20 +01:00
Bartek Szopka
2131784fea perspective and transition duration added to config 2012-03-08 22:56:13 +01:00
Bartek Szopka
5ff03982a1 added number validation and impress.js config 2012-03-08 22:35:08 +01:00
Bartek Szopka
eb4df9c0ee minimum and maximum scale added to config 2012-03-08 21:59:41 +01:00
Bartek Szopka
807943dadc keyboard handler updated - now triggering actions on keyup 2012-03-08 21:02:05 +01:00