diff options
| author | Julie Lala <jules@okfoc.us> | 2014-12-18 23:21:00 -0500 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-12-18 23:21:00 -0500 |
| commit | 6946255bb23b50e841a6684dc8950797d2a5dce6 (patch) | |
| tree | d1390e405e5302bdbc03d115a6e20afae8469739 /js/util.js | |
| parent | dda251707cd91ec5d377816de4ea7a6e3da4147e (diff) | |
| parent | 8746a003b0226cd7bd67eca8fcf3774313021093 (diff) | |
merge
Diffstat (limited to 'js/util.js')
| -rw-r--r-- | js/util.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -143,3 +143,12 @@ function elastic (t) { return ( e * Math.pow( 2, - 10 * t ) * Math.sin( ( t - f / 4 ) * ( 2 * Math.PI ) / f ) + 1 ); } +Model=function a(b,c,d,e){function f(){var a=this,f={};a.on=function(a,b){(f[a]|| +(f[a]=[])).push(b)},a.trigger=function(a,b){for(var c=f[a],d=0;c&&d<c.length;)c +[d++](b)},a.off=function(a,b){for(d=f[a]||[];b&&(c=d.indexOf(b))>-1;)d.splice(c +,1);f[a]=b?d:[]};for(c in b)d=b[c],a[c]=typeof d=="function"?function(){return( +d=this.apply(a,arguments))===e?a:d}.bind(d):d;a.init&&a.init.apply(a,arguments) +}return f.extend=function(f){d={};for(c in b)d[c]=b[c];for(c in f)d[c]=f[c],b[c +]!==e&&(d["__"+c]=b[c]);return a(d)},f},typeof module=="object"&&(module.exports +=Model); // c-{{{-< + |
