Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common libraries in src/lib #625

Merged
merged 3 commits into from
Oct 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,31 @@ rootElement.addEventListener( "impress:init", function() {
impress().init();
```

#### .tear()

Resets the DOM to its original state, as it was before `init()` was called.

This can be used to "unload" impress.js. A particular use case for this is, if you want to do
dynamic changes to the presentation, you can do a teardown, apply changes, then call `init()`
again. (In most cases, this will not cause flickering or other visible effects to the user,
beyond the intended dynamic changes.)

**Example:**

```JavaScript
impress().tear();
```

**Example:**

```JavaScript
var rootElement = document.getElementById( "impress" );
rootElement.addEventListener( "impress:init", function() {
console.log( "Impress init" );
});
impress().init();
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a copy/paste leftover here, I'll raise a PR to remove it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


#### .next()

Navigates to the next step of the presentation using the [`goto()` function](#impressgotostepindexstepelementidstepelement-duration).
Expand Down
4 changes: 4 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ var buildify = require('buildify');

buildify()
.load('src/impress.js')
// Libraries from src/lib
.concat(['src/lib/gc.js'])
.concat(['src/lib/util.js'])
// Plugins from src/plugins
.concat(['src/plugins/navigation/navigation.js',
'src/plugins/resize/resize.js'])
.save('js/impress.js');
Expand Down
Loading