Skip to content

Commit

Permalink
Prevent going out of bound in the master presentation
Browse files Browse the repository at this point in the history
Signed-off-by: Paul-Elliot <[email protected]>
  • Loading branch information
panglesd committed Jan 21, 2024
1 parent cee4696 commit 4ce295b
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 15 deletions.
18 changes: 9 additions & 9 deletions compiler/data/data_contents.ml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion compiler/data/slipshow.cdn.min.js.crunch

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/slipIntroduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<slip-title>Slip.js</slip-title> <!-- Beamer style title -->
<slip-body> <!-- Beamer style margin -->
<ul>
<li><span emphasize-at="0">Slip.js</span> is a "slide" engine written in javascript.</li>
<li><span emphasize-at="0">Slipshow</span> is a "slide" engine written in javascript.</li>
<li pause>Its goal is to keep the best from both worlds of:
<ul>
<li><span emphasize-at="1">Beamer</span>, its simplicity to create slides without worrying too much on presentation.</li>
Expand Down
8 changes: 8 additions & 0 deletions src/modules/engine.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ export default function (root) {
this.gotoSlip(newCurrentSlip);
return true;
}
if (currentSlip.element.tagName == "SLIP-SLIPSHOW" && currentSlip.getActionIndex() >= currentSlip.getMaxNext()) {
this.previous();
return false
}
return false;
};
this.nextSlip = function () {
Expand Down Expand Up @@ -315,6 +319,10 @@ export default function (root) {
// this.gotoSlip(newCurrentSlip, {delay: currentSlip.delay});
// this.showToC();
this.updateCounter();
if (currentSlip.element.tagName == "SLIP-SLIPSHOW" && currentSlip.getActionIndex() <= 0) {
this.next();
return true
}
return true;
} else if(options){
setTimeout(() => {
Expand Down
8 changes: 8 additions & 0 deletions staged_dist/slipshow.cdn.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staged_dist/slipshow.cdn.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion staged_dist/slipshow.cdn.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion staged_dist/slipshow.cdn.min.js.map

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions staged_dist/slipshow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion staged_dist/slipshow.js.map

Large diffs are not rendered by default.

0 comments on commit 4ce295b

Please sign in to comment.