aboutsummaryrefslogtreecommitdiff
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-10-13 15:38:24 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-10-13 15:38:24 -0400
commit2de43199ef9fe42704eb4cf2aeb19e585ad7e68f (patch)
treebabd569ff92ed6ab83bbfde7ffd4fc736136b237 /js/reveal.js
parent29c5af84bec03273b710e65e0d9f3072b96f5ce6 (diff)
downloadfreenode-live-2017-presentation-2de43199ef9fe42704eb4cf2aeb19e585ad7e68f.tar
freenode-live-2017-presentation-2de43199ef9fe42704eb4cf2aeb19e585ad7e68f.tar.gz
minor tweaks and comments
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 8fae129..603e3bd 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -2825,6 +2825,16 @@ var Reveal = (function(){
// --------------------------------------------------------------------//
+ /**
+ * Constructor for the playback component, which displays
+ * play/pause/progress controls.
+ *
+ * @param {HTMLElement} container The component will append
+ * itself to this
+ * @param {Function} progressCheck A method which will be
+ * called frequently to get the current progress on a range
+ * of 0-1
+ */
function Playback( container, progressCheck ) {
this.size = 50;
@@ -2883,6 +2893,8 @@ var Reveal = (function(){
x = this.size / 2,
y = this.size / 2;
+ var iconSize = 14;
+
var startAngle = - Math.PI / 2;
var endAngle = startAngle + ( progress * ( Math.PI * 2 ) );
@@ -2902,15 +2914,13 @@ var Reveal = (function(){
this.context.strokeStyle = '#666';
this.context.stroke();
- // Draw progress along arc edge
+ // Draw progress on top of track
this.context.beginPath();
this.context.arc( x, y, radius, startAngle, endAngle, false );
this.context.lineWidth = this.thickness;
this.context.strokeStyle = '#fff';
this.context.stroke();
- var iconSize = 14;
-
this.context.translate( x - ( iconSize / 2 ), y - ( iconSize / 2 ) );
// Draw play/pause icons