From d2dff6a821a6da55bfbd21155f91cae915a0e4c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Lechtenb=C3=B6rger?= Date: Sun, 8 Nov 2020 17:39:04 +0100 Subject: [PATCH 1/4] Fix target for click on progress bar The progress bar shows how many slides have been passed in total. However, when clicking on the progress bar, the target slide is computed among the subset of /horizontal/ slides. Thus, when the new slide is displayed, the progress bar has usually changed to a point that is unrelated to the clicked one, which I find surprising. With this change, the target slide is computed from the number of total slides. Thus, after a click on the progress bar, the resulting progress is close to the clicked point, which seems more natural to me. --- js/controllers/progress.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/controllers/progress.js b/js/controllers/progress.js index e806e38..82a370a 100644 --- a/js/controllers/progress.js +++ b/js/controllers/progress.js @@ -88,14 +88,16 @@ export default class Progress { event.preventDefault(); - let slidesTotal = this.Reveal.getHorizontalSlides().length; + let slides = this.Reveal.getSlides(); + let slidesTotal = slides.length; let slideIndex = Math.floor( ( event.clientX / this.getMaxWidth() ) * slidesTotal ); if( this.Reveal.getConfig().rtl ) { slideIndex = slidesTotal - slideIndex; } - this.Reveal.slide( slideIndex ); + let targetIndices = this.Reveal.getIndices(slides[slideIndex]); + this.Reveal.slide( targetIndices.h, targetIndices.v ); } From 1e70d9fe46d1e58a8e30703ff920278e8ad44480 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Wed, 25 Nov 2020 15:06:14 +0100 Subject: [PATCH 2/4] upgrade to node-sass 5.0 (adds support for node 15.x) #2841 --- dist/reveal.css | 2 +- dist/reveal.esm.js | 4 +- dist/reveal.js | 4 +- gulpfile.js | 2 + package-lock.json | 15192 +++++++++++++++++++++++----- package.json | 3 +- plugin/highlight/highlight.esm.js | 4 +- plugin/highlight/highlight.js | 4 +- plugin/markdown/markdown.esm.js | 2 +- plugin/markdown/markdown.js | 2 +- plugin/notes/notes.esm.js | 2 +- plugin/notes/notes.js | 2 +- plugin/search/search.esm.js | 2 +- plugin/search/search.js | 2 +- 14 files changed, 12794 insertions(+), 2433 deletions(-) diff --git a/dist/reveal.css b/dist/reveal.css index b09c3b6..3d598c4 100644 --- a/dist/reveal.css +++ b/dist/reveal.css @@ -1,5 +1,5 @@ /*! -* reveal.js 4.0.2 +* reveal.js 4.1.0 * https://revealjs.com * MIT licensed * diff --git a/dist/reveal.esm.js b/dist/reveal.esm.js index c6a6b95..c633225 100644 --- a/dist/reveal.esm.js +++ b/dist/reveal.esm.js @@ -1,9 +1,9 @@ /*! -* reveal.js 4.0.2 +* reveal.js 4.1.0 * https://revealjs.com * MIT licensed * * Copyright (C) 2020 Hakim El Hattab, https://hakim.se */ -var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var n,a=function(e){return e&&e.Math==Math&&e},s=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof e&&e)||Function("return this")(),r={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},o=function(e){try{return!!e()}catch(e){return!0}},l={}.toString,d=function(e){return l.call(e).slice(8,-1)},c="".split,u=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==d(e)?c.call(e,""):Object(e)}:Object,h=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},g=function(e){return u(h(e))},v=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),p=function(e){return"object"==typeof e?null!==e:"function"==typeof e},f=s.document,m=p(f)&&p(f.createElement),b=function(e){return m?f.createElement(e):{}},y=!v&&!o((function(){return 7!=Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a})),w=function(e){if(!p(e))throw TypeError(String(e)+" is not an object");return e},S=function(e,t){if(!p(e))return e;var i,n;if(t&&"function"==typeof(i=e.toString)&&!p(n=i.call(e)))return n;if("function"==typeof(i=e.valueOf)&&!p(n=i.call(e)))return n;if(!t&&"function"==typeof(i=e.toString)&&!p(n=i.call(e)))return n;throw TypeError("Can't convert object to primitive value")},E=Object.defineProperty,R={f:v?E:function(e,t,i){if(w(e),t=S(t,!0),w(i),y)try{return E(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},A=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},k=v?function(e,t,i){return R.f(e,t,A(1,i))}:function(e,t,i){return e[t]=i,e},L=function(e,t){try{k(s,e,t)}catch(i){s[e]=t}return t},x=s["__core-js_shared__"]||L("__core-js_shared__",{}),C=i((function(e){(e.exports=function(e,t){return x[e]||(x[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),P={}.hasOwnProperty,N=function(e,t){return P.call(e,t)},M=0,I=Math.random(),T=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++M+I).toString(36)},D=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),O=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,z=C("wks"),H=s.Symbol,B=O?H:H&&H.withoutSetter||T,U=function(e){return N(z,e)||(D&&N(H,e)?z[e]=H[e]:z[e]=B("Symbol."+e)),z[e]},j=Math.ceil,F=Math.floor,q=function(e){return isNaN(e=+e)?0:(e>0?F:j)(e)},W=Math.min,_=function(e){return e>0?W(q(e),9007199254740991):0},V=Math.max,K=Math.min,X=function(e){return function(t,i,n){var a,s=g(t),r=_(s.length),o=function(e,t){var i=q(e);return i<0?V(i+t,0):K(i,t)}(n,r);if(e&&i!=i){for(;r>o;)if((a=s[o++])!=a)return!0}else for(;r>o;o++)if((e||o in s)&&s[o]===i)return e||o||0;return!e&&-1}},$={includes:X(!0),indexOf:X(!1)},Y={},G=$.indexOf,J=function(e,t){var i,n=g(e),a=0,s=[];for(i in n)!N(Y,i)&&N(n,i)&&s.push(i);for(;t.length>a;)N(n,i=t[a++])&&(~G(s,i)||s.push(i));return s},Q=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Z=Object.keys||function(e){return J(e,Q)},ee=v?Object.defineProperties:function(e,t){w(e);for(var i,n=Z(t),a=n.length,s=0;a>s;)R.f(e,i=n[s++],t[i]);return e},te=s,ie=function(e){return"function"==typeof e?e:void 0},ne=function(e,t){return arguments.length<2?ie(te[e])||ie(s[e]):te[e]&&te[e][t]||s[e]&&s[e][t]},ae=ne("document","documentElement"),se=C("keys"),re=function(e){return se[e]||(se[e]=T(e))},oe=re("IE_PROTO"),le=function(){},de=function(e){return"