Skip to content

Commit

Permalink
expose new api for slide commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Neculau committed Nov 21, 2012
1 parent 03dcd05 commit ef27597
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion remark.min.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/remark.js
Expand Up @@ -29,6 +29,19 @@ api.ready = function () {
api.emit('ready');
};

api.gotoSlide = function(slideNoOrName) {
dispatcher.emit('gotoSlide', slideNoOrName);
};

api.gotoNextSlide = function() {
dispatcher.emit('gotoNextSlide');
};

api.gotoPreviousSlide = function() {
dispatcher.emit('gotoPreviousSlide');
};


function assureElementsExist (sourceElement, slideshowElement) {
if (!sourceElement) {
dom.alert('remark error: source element not present.');
Expand Down

0 comments on commit ef27597

Please sign in to comment.