From 82b8f3d4bb61f38162a6d2f17208a0144da14721 Mon Sep 17 00:00:00 2001 From: Chip Bell Date: Mon, 9 Jul 2018 12:58:51 -0400 Subject: [PATCH] Bumping versions and rebuilding --- bower.json | 2 +- dist/container.js | 21 +++++++++++++-------- dist/container.min.js | 4 ++-- library.json | 2 +- package.json | 2 +- src/container/plugins/PausePlugin.js | 15 ++++++++++----- 6 files changed, 28 insertions(+), 18 deletions(-) diff --git a/bower.json b/bower.json index 5ec0200..f065e57 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "springroll-container", - "version": "1.1.0", + "version": "1.1.1", "main": "dist/container.min.js", "dependencies": { diff --git a/dist/container.js b/dist/container.js index b57b274..4798162 100644 --- a/dist/container.js +++ b/dist/container.js @@ -1,4 +1,4 @@ -/*! SpringRoll Container 1.1.0 */ +/*! SpringRoll Container 1.1.1 */ /** * @module Core * @namespace window @@ -1389,9 +1389,9 @@ * @property {String} version * @static * @readOnly - * @default "1.1.0" + * @default "1.1.1" */ - Container.version = "1.1.0"; + Container.version = "1.1.1"; //Reference to the prototype var s = EventDispatcher.prototype; @@ -2611,7 +2611,8 @@ this.onPauseToggle = onPauseToggle.bind(this); - for(var i = 0; i < this.pauseButton.length; i++){ + for (var i = 0; i < this.pauseButton.length; i++) + { this.pauseButton[i].addEventListener('click', this.onPauseToggle); } @@ -2673,7 +2674,8 @@ this.trigger('pause', paused); // Set the pause button state - for(var i = 0; i < this.pauseButton.length; i++){ + for (var i = 0; i < this.pauseButton.length; i++) + { var element = this.pauseButton[i]; element.classList.remove('unpaused'); element.classList.remove('paused'); @@ -2709,7 +2711,8 @@ plugin.opened = function() { - for(var i = 0; i < this.pauseButton.length; i++){ + for (var i = 0; i < this.pauseButton.length; i++) + { this.pauseButton[i].classList.remove('disabled'); } @@ -2719,7 +2722,8 @@ plugin.close = function() { - for(var i = 0; i < this.pauseButton.length; i++){ + for (var i = 0; i < this.pauseButton.length; i++) + { this._disableButton.bind(this.pauseButton[i]); } this.paused = false; @@ -2727,7 +2731,8 @@ plugin.teardown = function() { - for(var i = 0; i < this.pauseButton.length; i++){ + for (var i = 0; i < this.pauseButton.length; i++) + { this.pauseButton[i].removeEventListener('click', this.onPauseToggle); } delete this.pauseButton; diff --git a/dist/container.min.js b/dist/container.min.js index 1e7ab3b..5fef22a 100644 --- a/dist/container.min.js +++ b/dist/container.min.js @@ -1,2 +1,2 @@ -/*! SpringRoll Container 1.1.0 */ -!function(){"use strict";!function(a,b,c){a.merge=function(b,c){b&&"object"==typeof b||(b={});for(var d in c)if(c.hasOwnProperty(d)){var e=c[d];if("object"==typeof e&&a.isPlain(e)){b[d]=a.merge(b[d],e);continue}b[d]=e}for(var f=2,g=arguments.length;f1&&(c=Array.prototype.slice.call(arguments,1));for(var e=d.length-1;e>=0;--e){var f=d[e];f._eventDispatcherOnce&&(delete f._eventDispatcherOnce,this.off(b,f)),f.apply(this,c)}}},e.once=function(a,b,c){return this.on(a,b,c,!0)},e.on=function(a,d,e,f){if(!this._destroyed){if("object"===c(a))for(var g in a)a.hasOwnProperty(g)&&this.on(g,a[g],e,f);else if("function"===c(d))for(var h,i=a.split(" "),j=null,k=0,l=i.length;k1&&h.sort(b));else if(Array.isArray(d))for(var m=0,n=d.length;m=0:c.length>0)},e.destroy=function(){this._destroyed=!0,this._listeners=null},namespace("springroll").EventDispatcher=d}(),function(a,b,c){var d=function(a,d){this._onFocus=a,this._onBlur=d,this._enabled=!1,(f||b.onfocusin!==c)&&(this._onToggle=function(){b.hidden||b.webkitHidden||b.msHidden||b.mozHidden?this._onBlur():this._onFocus()}.bind(this),this.enabled=!0)},e=extend(d),f=null;b.hidden!==c?f="visibilitychange":b.mozHidden!==c?f="mozvisibilitychange":b.msHidden!==c?f="msvisibilitychange":b.webkitHidden!==c&&(f="webkitvisibilitychange");var g=!f&&b.onfocusin!==c;Object.defineProperty(e,"enabled",{get:function(){return this._enabled},set:function(c){c=!!c,this._enabled!=c&&(this._enabled=c,a.removeEventListener("pagehide",this._onBlur),a.removeEventListener("pageshow",this._onFocus),a.removeEventListener("blur",this._onBlur),a.removeEventListener("focus",this._onFocus),a.removeEventListener("visibilitychange",this._onToggle),b.removeEventListener(f,this._onToggle,!1),g&&(b.removeEventListener("focusin",this._onFocus),b.removeEventListener("focusout",this._onBlur)),c&&(b.addEventListener(f,this._onToggle,!1),a.addEventListener("pagehide",this._onBlur),a.addEventListener("pageshow",this._onFocus),a.addEventListener("blur",this._onBlur),a.addEventListener("focus",this._onFocus),a.addEventListener("visibilitychange",this._onToggle,!1),g&&(b.addEventListener("focusin",this._onFocus),b.addEventListener("focusout",this._onBlur))))}}),e.destroy=function(){f&&this._onToggle&&(this.enabled=!1,this._onToggle=null,this._onFocus=null,this._onBlur=null)},namespace("springroll").PageVisibility=d}(window,document),function(a){var b={},c=window.Storage!==a,d=-1;if(c)try{localStorage.setItem("LS_TEST","test"),localStorage.removeItem("LS_TEST")}catch(e){c=!1}b.remove=function(a){c?(localStorage.removeItem(a),sessionStorage.removeItem(a)):b.write(a,"",d)},b.write=function(a,b,e){if(c)e?sessionStorage.setItem(a,JSON.stringify(b)):localStorage.setItem(a,JSON.stringify(b));else{var f;f=e?e!==d?"":"; expires=Thu, 01 Jan 1970 00:00:00 GMT":"; expires="+new Date(2147483646e3).toGMTString(),document.cookie=a+"="+escape(JSON.stringify(b))+f+"; path=/"}},b.read=function(a){if(c){var d=localStorage.getItem(a)||sessionStorage.getItem(a);return d?JSON.parse(d,b.reviver):null}var e,f,g=a+"=",h=document.cookie.split(";"),i=0;for(i=0,f=h.length;i0||navigator.pointerEnabled&&navigator.maxTouchPoints>0)}(),b.basic=function(){return b.canvas?b.webaudio||b.flash?null:"Browser does not support WebAudio or Flash audio":"Browser does not support canvas"},b.test=function(c){var d=b.basic();if(d)return d;var e=c.features,f=c.ui,g=c.sizes;for(var h in e)if(b[h]!==a&&e[h]&&!b[h])return"Browser does not support "+h;if(!f.touch&&b.touch)return"Game does not support touch input";if(!f.mouse&&!b.touch)return"Game does not support mouse input";var i=Math.max(window.screen.width,window.screen.height);return!g.xsmall&&i<480?"Game doesn't support extra small screens":!g.small&&i<768?"Game doesn't support small screens":!g.medium&&i<992?"Game doesn't support medium screens":!g.large&&i<1200?"Game doesn't support large screens":!g.xlarge&&i>=1200?"Game doesn't support extra large screens":null},namespace("springroll").Features=b}(),function(a,b){var c=include("springroll.EventDispatcher"),d=include("springroll.Features"),e=include("Bellhop"),f=function(b,d){if(c.call(this),this.options=d||{},this.name="springroll.Container",this.main=a.querySelector(b),null===this.main)throw new Error("No iframe was found with the provided selector");this.dom=this.main,this.client=null,this.release=null,this.loaded=!1,this.loading=!1,this._onCloseFailed=this._onCloseFailed.bind(this);for(var e=f._plugins,g=0;g=0;c--)b[c].closed.call(this);this.destroyClient(),this.loaded=!1,this.loading=!1,this.main.setAttribute("src",""),this.main.classList.remove("loading"),a&&(this.off("localError",this._onCloseFailed),this.trigger("closed"))},h.close=function(){if(this.loading||this.loaded){for(var a=f._plugins,b=a.length-1;b>=0;b--)a[b].close.call(this);this.trigger("close"),this.once("localError",this._onCloseFailed),this.client.send("close")}else this.reset()},h._onCloseFailed=function(){this.reset()},h.destroy=function(){this.reset(),g.destroy.call(this);for(var a=f._plugins,b=a.length-1;b>=0;b--)a[b].teardown.call(this);this.main=null,this.options=null,this.dom=null},namespace("springroll").Container=f}(document),function(){var a,b=function(b){a||(a=include("springroll.Container")),this.priority=b||0,this.setup=function(){},this.open=function(){},this.opened=function(){},this.close=function(){},this.closed=function(){},this.teardown=function(){},a._plugins.push(this),a._plugins.sort(function(a,b){return b.priority-a.priority})};namespace("springroll").ContainerPlugin=b}(),function(){var a=springroll.SavedData,b=new springroll.ContainerPlugin(100);b.setup=function(){this.sendMutes=!0,this._setMuteProp=function(b,c,d){function e(a){null!==a&&(a.classList.remove("unmuted"),a.classList.remove("muted"),a.classList.add(d?"muted":"unmuted"))}if(Array.isArray(c))for(var f=0,g=c.length;f1&&(c=Array.prototype.slice.call(arguments,1));for(var e=d.length-1;e>=0;--e){var f=d[e];f._eventDispatcherOnce&&(delete f._eventDispatcherOnce,this.off(b,f)),f.apply(this,c)}}},e.once=function(a,b,c){return this.on(a,b,c,!0)},e.on=function(a,d,e,f){if(!this._destroyed){if("object"===c(a))for(var g in a)a.hasOwnProperty(g)&&this.on(g,a[g],e,f);else if("function"===c(d))for(var h,i=a.split(" "),j=null,k=0,l=i.length;k1&&h.sort(b));else if(Array.isArray(d))for(var m=0,n=d.length;m=0:c.length>0)},e.destroy=function(){this._destroyed=!0,this._listeners=null},namespace("springroll").EventDispatcher=d}(),function(a,b,c){var d=function(a,d){this._onFocus=a,this._onBlur=d,this._enabled=!1,(f||b.onfocusin!==c)&&(this._onToggle=function(){b.hidden||b.webkitHidden||b.msHidden||b.mozHidden?this._onBlur():this._onFocus()}.bind(this),this.enabled=!0)},e=extend(d),f=null;b.hidden!==c?f="visibilitychange":b.mozHidden!==c?f="mozvisibilitychange":b.msHidden!==c?f="msvisibilitychange":b.webkitHidden!==c&&(f="webkitvisibilitychange");var g=!f&&b.onfocusin!==c;Object.defineProperty(e,"enabled",{get:function(){return this._enabled},set:function(c){c=!!c,this._enabled!=c&&(this._enabled=c,a.removeEventListener("pagehide",this._onBlur),a.removeEventListener("pageshow",this._onFocus),a.removeEventListener("blur",this._onBlur),a.removeEventListener("focus",this._onFocus),a.removeEventListener("visibilitychange",this._onToggle),b.removeEventListener(f,this._onToggle,!1),g&&(b.removeEventListener("focusin",this._onFocus),b.removeEventListener("focusout",this._onBlur)),c&&(b.addEventListener(f,this._onToggle,!1),a.addEventListener("pagehide",this._onBlur),a.addEventListener("pageshow",this._onFocus),a.addEventListener("blur",this._onBlur),a.addEventListener("focus",this._onFocus),a.addEventListener("visibilitychange",this._onToggle,!1),g&&(b.addEventListener("focusin",this._onFocus),b.addEventListener("focusout",this._onBlur))))}}),e.destroy=function(){f&&this._onToggle&&(this.enabled=!1,this._onToggle=null,this._onFocus=null,this._onBlur=null)},namespace("springroll").PageVisibility=d}(window,document),function(a){var b={},c=window.Storage!==a,d=-1;if(c)try{localStorage.setItem("LS_TEST","test"),localStorage.removeItem("LS_TEST")}catch(e){c=!1}b.remove=function(a){c?(localStorage.removeItem(a),sessionStorage.removeItem(a)):b.write(a,"",d)},b.write=function(a,b,e){if(c)e?sessionStorage.setItem(a,JSON.stringify(b)):localStorage.setItem(a,JSON.stringify(b));else{var f;f=e?e!==d?"":"; expires=Thu, 01 Jan 1970 00:00:00 GMT":"; expires="+new Date(2147483646e3).toGMTString(),document.cookie=a+"="+escape(JSON.stringify(b))+f+"; path=/"}},b.read=function(a){if(c){var d=localStorage.getItem(a)||sessionStorage.getItem(a);return d?JSON.parse(d,b.reviver):null}var e,f,g=a+"=",h=document.cookie.split(";"),i=0;for(i=0,f=h.length;i0||navigator.pointerEnabled&&navigator.maxTouchPoints>0)}(),b.basic=function(){return b.canvas?b.webaudio||b.flash?null:"Browser does not support WebAudio or Flash audio":"Browser does not support canvas"},b.test=function(c){var d=b.basic();if(d)return d;var e=c.features,f=c.ui,g=c.sizes;for(var h in e)if(b[h]!==a&&e[h]&&!b[h])return"Browser does not support "+h;if(!f.touch&&b.touch)return"Game does not support touch input";if(!f.mouse&&!b.touch)return"Game does not support mouse input";var i=Math.max(window.screen.width,window.screen.height);return!g.xsmall&&i<480?"Game doesn't support extra small screens":!g.small&&i<768?"Game doesn't support small screens":!g.medium&&i<992?"Game doesn't support medium screens":!g.large&&i<1200?"Game doesn't support large screens":!g.xlarge&&i>=1200?"Game doesn't support extra large screens":null},namespace("springroll").Features=b}(),function(a,b){var c=include("springroll.EventDispatcher"),d=include("springroll.Features"),e=include("Bellhop"),f=function(b,d){if(c.call(this),this.options=d||{},this.name="springroll.Container",this.main=a.querySelector(b),null===this.main)throw new Error("No iframe was found with the provided selector");this.dom=this.main,this.client=null,this.release=null,this.loaded=!1,this.loading=!1,this._onCloseFailed=this._onCloseFailed.bind(this);for(var e=f._plugins,g=0;g=0;c--)b[c].closed.call(this);this.destroyClient(),this.loaded=!1,this.loading=!1,this.main.setAttribute("src",""),this.main.classList.remove("loading"),a&&(this.off("localError",this._onCloseFailed),this.trigger("closed"))},h.close=function(){if(this.loading||this.loaded){for(var a=f._plugins,b=a.length-1;b>=0;b--)a[b].close.call(this);this.trigger("close"),this.once("localError",this._onCloseFailed),this.client.send("close")}else this.reset()},h._onCloseFailed=function(){this.reset()},h.destroy=function(){this.reset(),g.destroy.call(this);for(var a=f._plugins,b=a.length-1;b>=0;b--)a[b].teardown.call(this);this.main=null,this.options=null,this.dom=null},namespace("springroll").Container=f}(document),function(){var a,b=function(b){a||(a=include("springroll.Container")),this.priority=b||0,this.setup=function(){},this.open=function(){},this.opened=function(){},this.close=function(){},this.closed=function(){},this.teardown=function(){},a._plugins.push(this),a._plugins.sort(function(a,b){return b.priority-a.priority})};namespace("springroll").ContainerPlugin=b}(),function(){var a=springroll.SavedData,b=new springroll.ContainerPlugin(100);b.setup=function(){this.sendMutes=!0,this._setMuteProp=function(b,c,d){function e(a){null!==a&&(a.classList.remove("unmuted"),a.classList.remove("muted"),a.classList.add(d?"muted":"unmuted"))}if(Array.isArray(c))for(var f=0,g=c.length;f