1/* 2 _______ _ _ 3|__ __| | | (_) 4 | | __ _| | ___ _ _ __ ___ _ 5 | |/ _` | |/ / | | | '_ ` _ \| | 6 | | (_| | <| |_| | | | | | | | 7 |_|\__,_|_|\_\\__,_|_| |_| |_|_| 8 9*/ 10 11var Takumi = function () { 12 var Version = "1.0"; 13 /**************************** 14 Util 15 *****************************/ 16 function Util(config_) { 17 //settings 18 var _config = config_ || {}; 19 var _smallSize = _config.smallSize || 768; 20 function _isSmallSzie() { 21 var w = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 22 return w <= _smallSize; 23 } 24 25 function _getSmallSize() { 26 return _smallSize; 27 } 28 29 return { 30 isSmallSzie: _isSmallSzie, 31 getSmallSize: _getSmallSize 32 } 33 } 34 /**************************** 35 Motion 36 *****************************/ 37 function Motion() { 38 //settings 39 40 function _all(el_, paramObject_, time_, easing_, callback_) { 41 el_.stop(true, true).velocity('stop') 42 .velocity({ 43 p: paramObject_, 44 o: { 45 delay: 0, 46 duration: time_ || 700, 47 easing:easing_ || 'easeOutExpo', 48 complete: function () { 49 if(callback_ != null) { 50 callback_.call(); 51 } 52 } 53 } 54 }); 55 } 56 57 function _moveX(el_, x_, time_, easing_, callback_) { 58 el_.stop(true, true).velocity('stop') 59 .velocity({ 60 p: { opacity:1.0 , translateX: x_ }, 61 o: { 62 delay: 0, 63 duration: time_ || 700, 64 easing:easing_ || 'easeOutExpo', 65 complete: function () { 66 if(callback_ != null) { 67 callback_.call(); 68 } 69 } 70 } 71 }); 72 } 73 74 function _moveY(el_, y_, time_, easing_, callback_) { 75 el_.stop(true, true).velocity('stop') 76 .velocity({ 77 p: { opacity:1.0 , translateY: y_ }, 78 o: { 79 delay: 0, 80 duration: time_ || 700, 81 easing:easing_ || 'easeOutExpo', 82 complete: function () { 83 if(callback_ != null) { 84 callback_.call(); 85 } 86 } 87 } 88 }); 89 } 90 91 function _scale(el_, scale_, time_, easing_, callback_) { 92 el_.stop(true, true).velocity('stop') 93 .velocity({ 94 p: { scale: scale_ , rotate: '0.1deg'}, 95 o: { 96 delay: 0, 97 duration: time_ || 700, 98 easing:easing_ || 'easeOutCubic', 99 complete: function () { 100 if(callback_ != null) { 101 callback_.call(); 102 } 103 } 104 } 105 }); 106 } 107 108 return { 109 all: _all, 110 moveX: _moveX, 111 moveY: _moveY, 112 scale: _scale 113 } 114 115 } 116 117 /**************************** 118 Share 119 *****************************/ 120 function Share() { 121 122 function _facebook(url_) { 123 var path = encodeURIComponent(url_); 124 var url = 'https://www.facebook.com/sharer/sharer.php?u=' + path; 125 window.open(url); 126 } 127 128 function _twitter(url_, text_, hashtag_) { 129 var url = "https://twitter.com/share?"; 130 url += "text=" + encodeURIComponent(text_); 131 url += "&url=" + encodeURIComponent(url_); 132 if(hashtag_ != null) { 133 url += "&hashtags=" + encodeURIComponent(hashtag_); 134 } 135 window.open(url); 136 } 137 138 return { 139 facebook: _facebook, 140 twitter: _twitter 141 } 142 } 143 144 145 return { 146 Version: Version, 147 Util: Util, 148 Motion: Motion, 149 Share: Share, 150 }; 151 152}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.