From e3816888a09832a412fa6a98b0a7e3ff6c7f7fe9 Mon Sep 17 00:00:00 2001 From: Oleg Solomka Date: Tue, 19 Jul 2016 10:45:56 -0500 Subject: [PATCH] mojs-logo: change to target=_blank link --- bower.json | 2 +- build/mojs-player.js | 8 ++++++-- build/mojs-player.min.js | 10 +++++----- js/components/button.babel.js | 3 +++ js/mojs-player.babel.js | 3 ++- lib/components/button.js | 3 +++ package.json | 2 +- 7 files changed, 21 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index f743fda..53912a5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "mojs-player", - "version": "0.43.14", + "version": "0.43.15", "description": "Player controls for [mojs](mojs.io). Intended to help you to craft `mojs` animation sequences.", "main": "build/mojs-player.min.js", "authors": [ diff --git a/build/mojs-player.js b/build/mojs-player.js index 9edcb5d..2970cd4 100644 --- a/build/mojs-player.js +++ b/build/mojs-player.js @@ -1,7 +1,7 @@ /*! :: MojsPlayer :: Player controls for [mojs](mojs.io). Intended to help you to craft `mojs` animation sequences. Oleg Solomka @LegoMushroom 2016 MIT - 0.43.14 + 0.43.15 */ (function webpackUniversalModuleDefinition(root, factory) { @@ -181,7 +181,7 @@ return /******/ (function(modules) { // webpackBootstrap this._defaults.precision = 0.1; this._defaults.name = 'mojs-player'; - this.revision = '0.43.14'; + this.revision = '0.43.15'; var str = this._fallbackTo(this._o.name, this._defaults.name); str += str === this._defaults.name ? '' : '__' + this._defaults.name; @@ -366,6 +366,7 @@ return /******/ (function(modules) { // webpackBootstrap this.mojsButton = new _iconButton2.default({ parent: right, icon: 'mojs', + target: '_blank', link: 'https://github.com/legomushroom/mojs-player', title: 'mo • js', prefix: this._props.prefix @@ -7562,6 +7563,7 @@ return /******/ (function(modules) { // webpackBootstrap _Module.prototype._declareDefaults.call(this); this._defaults.link = null; this._defaults.title = ''; + this._defaults.target = null; this._defaults.onPointerDown = null; this._defaults.onPointerUp = null; this._defaults.onDoubleTap = null; @@ -7577,10 +7579,12 @@ return /******/ (function(modules) { // webpackBootstrap var p = this._props, className = 'button', tagName = p.link != null ? 'a' : 'div'; + this._addMainElement(tagName); this.el.classList.add(CLASSES[className]); this.el.setAttribute('title', p.title); p.link && this.el.setAttribute('href', p.link); + p.link && p.target && this.el.setAttribute('target', p.target); this._addListeners(); this._createRipple(); diff --git a/build/mojs-player.min.js b/build/mojs-player.min.js index 09a3b42..056fb56 100644 --- a/build/mojs-player.min.js +++ b/build/mojs-player.min.js @@ -1,10 +1,10 @@ /*! :: MojsPlayer :: Player controls for [mojs](mojs.io). Intended to help you to craft `mojs` animation sequences. Oleg Solomka @LegoMushroom 2016 MIT - 0.43.14 + 0.43.15 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("mojs-player",[],e):"object"==typeof exports?exports["mojs-player"]=e():t["mojs-player"]=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="build/",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){var i;(function(t,o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var s=n(3),a=r(s),u=n(71),l=r(u),p=n(73),h=r(p),c=n(78),d=r(c),f=n(79),_=r(f),g=n(80),y=r(g),v=n(88),m=(r(v),n(89)),b=r(m),x=n(90),w=r(x),S=n(91),P=r(S),T=n(111),k=r(T),C=n(123),E=r(C),M=n(135),O=r(M),L=n(143),B=r(L),j=n(147),D=r(j),I=n(155),R=r(I),A=n(156),F=r(A);n(160);var N=n(162),q=function(t){function e(n){if((0,d["default"])(this,e),"undefined"==typeof mojs)throw new Error("MojsPlayer relies on mojs^0.225.2, please include it before player initialization. [ https://github.com/legomushroom/mojs ] ");return(0,_["default"])(this,t.call(this,n))}return(0,y["default"])(e,t),e.prototype._declareDefaults=function(){t.prototype._declareDefaults.call(this),this._defaults.isSaveState=!0,this._defaults.isPlaying=!1,this._defaults.progress=0,this._defaults.isRepeat=!1,this._defaults.isBounds=!1,this._defaults.leftBound=0,this._defaults.rightBound=1,this._defaults.isSpeed=!1,this._defaults.speed=1,this._defaults.isHidden=!1,this._defaults.precision=.1,this._defaults.name="mojs-player",this.revision="0.43.14";var e=this._fallbackTo(this._o.name,this._defaults.name);e+=e===this._defaults.name?"":"__"+this._defaults.name,this._localStorage=e+"__"+this._hashCode(e)},e.prototype._extendDefaults=function(){this._props={};var t=this._props,e=this._o,n=this._defaults;t.isSaveState=this._fallbackTo(e.isSaveState,n.isSaveState);var i=t.isSaveState?JSON.parse(localStorage.getItem(this._localStorage))||{}:{};for(var o in n){var r=this._fallbackTo(i[o],e[o]);this._assignProp(o,this._fallbackTo(r,n[o]))}this._props["raw-speed"]=this._fallbackTo(i["raw-speed"],.5)},e.prototype._keyUp=function(t){if(t.altKey)switch(t.keyCode){case 80:this._props.isPlaying=!this._props.isPlaying,this._onPlayStateChange(this._props.isPlaying);break;case 189:this.playButton.off(),this.playerSlider.decreaseProgress(t.shiftKey?.1:.01);break;case 187:this.playButton.off(),this.playerSlider.increaseProgress(t.shiftKey?.1:.01);break;case 83:this._onStop();break;case 82:this._props.isRepeat=!this._props.isRepeat;var e=this._props.isRepeat?"on":"off";this.repeatButton[e]();break;case 66:this._props.isBounds=!this._props.isBounds;var e=this._props.isBounds?"on":"off";this.boundsButton[e]();break;case 72:this._props.isHidden=!this._props.isHidden,this._onHideStateChange(this._props.isHidden);var e=this._props.isHidden?"on":"off";this.hideButton[e]();break;case 81:this.speedControl.reset();break;case 50:this.speedControl.decreaseSpeed(t.shiftKey?.05:.01);break;case 51:this.speedControl.increaseSpeed(t.shiftKey?.05:.01)}},e.prototype._vars=function(){this._hideCount=0},e.prototype._render=function(){this._initTimeline();var e=this._props,n="mojs-player";new b["default"]({prefix:this._props.prefix});t.prototype._render.call(this),this.el.classList.add(N[n]),this.el.setAttribute("id","js-mojs-player");var i=this._createChild("div",N[n+"__left"]),o=this._createChild("div",N[n+"__mid"]),r=this._createChild("div",N[n+"__right"]);this.repeatButton=new D["default"]({parent:i,isOn:e.isRepeat,onStateChange:this._onRepeatStateChange.bind(this),prefix:this._props.prefix}),this.playerSlider=new P["default"]({parent:o,isBounds:e.isBounds,leftProgress:e.leftBound,rightProgress:e.rightBound,progress:e.progress,onLeftProgress:this._onLeftProgress.bind(this),onProgress:this._onProgress.bind(this),onRightProgress:this._onRightProgress.bind(this),onSeekStart:this._onSeekStart.bind(this),onSeekEnd:this._onSeekEnd.bind(this)}),this.boundsButton=new R["default"]({isOn:e.isBounds,parent:i,onStateChange:this._boundsStateChange.bind(this),prefix:this._props.prefix}),this.speedControl=new E["default"]({parent:i,speed:e.speed,isOn:e.isSpeed,onSpeedChange:this._onSpeedChange.bind(this),onIsSpeed:this._onIsSpeed.bind(this),prefix:this._props.prefix});this.stopButton=new B["default"]({parent:i,isPrepend:!0,onPointerUp:this._onStop.bind(this),prefix:this._props.prefix}),this.playButton=new O["default"]({parent:i,isOn:e.isPlaying,isPrepend:!0,onStateChange:this._onPlayStateChange.bind(this),prefix:this._props.prefix}),this.mojsButton=new k["default"]({parent:r,icon:"mojs",link:"https://github.com/legomushroom/mojs-player",title:"mo • js",prefix:this._props.prefix}),this.hideButton=new F["default"]({parent:this.el,className:N[n+"__hide-button"],isOn:e.isHidden,onStateChange:this._onHideStateChange.bind(this),prefix:this._props.prefix}),this._listen()},e.prototype._listen=function(){var t="onpagehide"in window?"pagehide":"beforeunload";window.addEventListener(t,this._onUnload.bind(this)),document.addEventListener("keyup",this._keyUp.bind(this))},e.prototype._onSeekStart=function(t){this._sysTween.pause()},e.prototype._onSeekEnd=function(t){var e=this;clearTimeout(this._endTimer),this._endTimer=setTimeout(function(){e._props.isPlaying&&e._play()},20)},e.prototype._initTimeline=function(){var t=this;this.timeline=new mojs.Timeline({});var e=this._o.add,n="undefined"==typeof e;n||(e=e.timeline||e);var i=e instanceof mojs.Tween,o=e instanceof mojs.Timeline;if(n||!i&&!o)throw new Error("MojsPlayer expects Tween/Timeline/Module as `add` option in constructor call. [ new MojsPlayer({ add: new mojs.Tween }); ]");this.timeline.add(this._o.add),this._sysTween=new mojs.Tween({easing:"linear.none",duration:this.timeline._props.repeatTime,onProgress:this._onSysProgress.bind(this),onComplete:this._onSysTweenComplete.bind(this),onPlaybackStop:function(){t._setPlayState("off")},onPlaybackPause:function(){t._setPlayState("off")},onPlaybackStart:function(){t._setPlayState("on")}})},e.prototype._onSysProgress=function(t){this.playerSlider.setTrackProgress(t);var e=this._props.isBounds?this._props.rightBound:1,n=this._props.isBounds?this._props.leftBound:-1;n-.01>t&&0!==t&&(this._reset(),requestAnimationFrame(this._play.bind(this))),t>=e&&(this._reset(1===e),this._props.isRepeat?requestAnimationFrame(this._play.bind(this)):this._props.isPlaying=!1)},e.prototype._play=function(){var t=this._props,e=t.isBounds?t.leftBound:t.progress,n=t.progress>=this._getBound("right")?e:t.progress;1===n&&(n=t.isBounds?t.leftBound:0),0!==n&&this._sysTween.setProgress(n),this._sysTween.play()},e.prototype._reset=function(t){if(this._sysTween.reset(),!t)for(var e=this._props,n=e.progress,i=n,o=e.isBounds?e.leftBound:0;i-e.precision>=o;)i-=e.precision,this.timeline.setProgress(i);this.timeline.reset()},e.prototype._setPlayState=function(t){var e=this;clearTimeout(this._playTimeout),this._playTimeout=setTimeout(function(){e.playButton&&e.playButton[t](!1)},20)},e.prototype._onSysTweenComplete=function(t){},e.prototype._onPlayStateChange=function(t){this._props.isPlaying=t,t?this._play():this._sysTween.pause()},e.prototype._onHideStateChange=function(t){this._props.isHidden=t;var e=t?"add":"remove";this.el.classList[e](N["is-hidden"]),1===this._hideCount++&&this.el.classList.add(N["is-transition"])},e.prototype._onStop=function(){var t=this._props;t.isPlaying=!1;var e=t.isBounds?t.leftBound:0;this._sysTween.setProgress(e+.01),this._sysTween.setProgress(e),this._reset()},e.prototype._onRepeatStateChange=function(t){this._props.isRepeat=t},e.prototype._boundsStateChange=function(t){this.playerSlider._props.isBounds=t,this.playerSlider[(t?"enable":"disable")+"Bounds"](),this._props.isBounds=t},e.prototype._onSpeedChange=function(t,e){this._props["raw-speed"]=e,this._props.speed=t,this._sysTween.setSpeed(t)},e.prototype._onIsSpeed=function(t){this._props.isSpeed=t},e.prototype._onLeftProgress=function(t){this._props.leftBound=t},e.prototype._onProgress=function(t){if(this._props.progress=t,!this.timeline._prevTime&&t>0){var e=0;do this.timeline.setProgress(e),e+=this._props.precision;while(e+this._props.precisione;e++)n=t.charCodeAt(e),o=(o<<5)-o+n,o|=0;return Math.abs(o)},e}(w["default"]);i=function(){return q}.call(e,n,e,t),!(void 0!==i&&(t.exports=i)),"object"===(0,a["default"])(t)&&"object"===(0,a["default"])(t.exports)&&(t.exports=q);var z="undefined"!=typeof o?o:window;z.MojsPlayer=q,e["default"]=q}).call(e,n(2)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(4),r=i(o),s=n(55),a=i(s),u="function"==typeof a["default"]&&"symbol"==typeof r["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof a["default"]&&t.constructor===a["default"]?"symbol":typeof t};e["default"]="function"==typeof a["default"]&&"symbol"===u(r["default"])?function(t){return"undefined"==typeof t?"undefined":u(t)}:function(t){return t&&"function"==typeof a["default"]&&t.constructor===a["default"]?"symbol":"undefined"==typeof t?"undefined":u(t)}},function(t,e,n){t.exports={"default":n(5),__esModule:!0}},function(t,e,n){n(6),n(50),t.exports=n(54).f("iterator")},function(t,e,n){"use strict";var i=n(7)(!0);n(10)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var i=n(8),o=n(9);t.exports=function(t){return function(e,n){var r,s,a=String(o(e)),u=i(n),l=a.length;return 0>u||u>=l?t?"":void 0:(r=a.charCodeAt(u),55296>r||r>56319||u+1===l||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):r:t?a.slice(u,u+2):(r-55296<<10)+(s-56320)+65536)}}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var i=n(11),o=n(12),r=n(27),s=n(17),a=n(28),u=n(29),l=n(30),p=n(46),h=n(48),c=n(47)("iterator"),d=!([].keys&&"next"in[].keys()),f="@@iterator",_="keys",g="values",y=function(){return this};t.exports=function(t,e,n,v,m,b,x){l(n,e,v);var w,S,P,T=function(t){if(!d&&t in M)return M[t];switch(t){case _:return function(){return new n(this,t)};case g:return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",C=m==g,E=!1,M=t.prototype,O=M[c]||M[f]||m&&M[m],L=O||T(m),B=m?C?T("entries"):L:void 0,j="Array"==e?M.entries||O:O;if(j&&(P=h(j.call(new t)),P!==Object.prototype&&(p(P,k,!0),i||a(P,c)||s(P,c,y))),C&&O&&O.name!==g&&(E=!0,L=function(){return O.call(this)}),i&&!x||!d&&!E&&M[c]||s(M,c,L),u[e]=L,u[k]=y,m)if(w={values:C?L:T(g),keys:b?L:T(_),entries:B},x)for(S in w)S in M||r(M,S,w[S]);else o(o.P+o.F*(d||E),e,w);return w}},function(t,e){t.exports=!0},function(t,e,n){var i=n(13),o=n(14),r=n(15),s=n(17),a="prototype",u=function(t,e,n){var l,p,h,c=t&u.F,d=t&u.G,f=t&u.S,_=t&u.P,g=t&u.B,y=t&u.W,v=d?o:o[e]||(o[e]={}),m=v[a],b=d?i:f?i[e]:(i[e]||{})[a];d&&(n=e);for(l in n)p=!c&&b&&void 0!==b[l],p&&l in v||(h=p?b[l]:n[l],v[l]=d&&"function"!=typeof b[l]?n[l]:g&&p?r(h,i):y&&b[l]==h?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[a]=t[a],e}(h):_&&"function"==typeof h?r(Function.call,h):h,_&&((v.virtual||(v.virtual={}))[l]=h,t&u.R&&m&&!m[l]&&s(m,l,h)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(16);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(18),o=n(26);t.exports=n(22)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(19),o=n(21),r=n(25),s=Object.defineProperty;e.f=n(22)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return s(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(20);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(22)&&!n(23)(function(){return 7!=Object.defineProperty(n(24)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=!n(23)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var i=n(20),o=n(13).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e,n){var i=n(20);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports=n(17)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports={}},function(t,e,n){"use strict";var i=n(31),o=n(26),r=n(46),s={};n(17)(s,n(47)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:o(1,n)}),r(t,e+" Iterator")}},function(t,e,n){var i=n(19),o=n(32),r=n(44),s=n(41)("IE_PROTO"),a=function(){},u="prototype",l=function(){var t,e=n(24)("iframe"),i=r.length,o=">";for(e.style.display="none",n(45).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("