Permalink
Browse files

update XTK version

  • Loading branch information...
1 parent 7e9d39b commit a5d618a86d3f4553225c6e441efa36c77fcdb4f0 @NicolasRannou NicolasRannou committed Jan 14, 2015
Showing with 3 additions and 3 deletions.
  1. +3 −3 xtk_edge.js
View
@@ -332,7 +332,7 @@ w.Ki=function(){this.Fe();this.dispatchEvent("change")};w.Fe=function(){if(this.
e+=" overflow: hidden;\n";e+=" width: 0%;\n";e+=" height: 100%;\n";e+="}";var d;d=".progress-bar-thumb-done {\n background: #57E964;\n}";this.fc=[c,e,d];this.Od(b);this.uf()}C(Hg,Eg);
Hg.prototype.uf=function(){var a=oe(this.ab,"position");if("static"==a||""==a)this.Ue=this.ab.style.position,this.ab.style.position="relative";var a=document.getElementsByTagName("head")[0],b=de("style");b.type="text/css";b.media="screen";var c=document.createTextNode(String(this.fc[0])),e=document.createTextNode(String(this.fc[1])),d=document.createTextNode(String(this.fc[2]));a.appendChild(b);b.appendChild(c);b.appendChild(e);b.appendChild(d);this.Fb=b;this.cc(this.ab);a=this.t();a.style.position=
"absolute";a.style.top=(this.ab.clientHeight-5)/2+"px";a.style.left=(this.ab.clientWidth-100)/2+"px";a.classList.add("xtk-progress-bar")};function Ig(a){var b=a.t().style.top,c=a.t().style.left;ge(a.t());var e=new Hg(a.ab,100),d=e.t();d.style.position="absolute";d.style.top=b;d.style.left=c;d.classList.add("xtk-progress-bar");(d.firstElementChild!=p?d.firstElementChild:he(d.firstChild)).classList.add("progress-bar-thumb-done");a.Td=e}
-Hg.prototype.Fd=function(){this.Fb&&ge(this.Fb);this.t()&&ge(this.t());this.Td&&ge(this.Td.t());this.Td=this.Fb=t;this.Ue&&(this.ab.style.position=this.Ue)};function Jg(a,b,c){oa(a)?c&&(a=va(a,c)):a&&"function"==typeof a.handleEvent?a=va(a.handleEvent,a):m(Error("Invalid listener argument"));return 2147483647<b?-1:fa.setTimeout(a,b||0)};function Kg(){M.call(this);this.f="renderer";this.v=window.document.body;this.K=this.v.clientWidth;this.A=this.v.clientHeight;this.T=this.N=this.na=t;this.pb=new sg(nd);this.Ha=[];this.aa=t;this.Zd=this.hd=this.Xd=u;this.a=this.Vb=this.La=t;this.R={PROGRESSBAR_ENABLED:q,INTERMEDIATE_RENDERING:u,SLICENAVIGATORS:q};this.He=-1;window.console.log("XTK release 10 -- 2015-01-14 13:38:53 -- http://www.goXTK.com -- @goXTK")}C(Kg,M);w=Kg.prototype;
+Hg.prototype.Fd=function(){this.Fb&&ge(this.Fb);this.t()&&ge(this.t());this.Td&&ge(this.Td.t());this.Td=this.Fb=t;this.Ue&&(this.ab.style.position=this.Ue)};function Jg(a,b,c){oa(a)?c&&(a=va(a,c)):a&&"function"==typeof a.handleEvent?a=va(a.handleEvent,a):m(Error("Invalid listener argument"));return 2147483647<b?-1:fa.setTimeout(a,b||0)};function Kg(){M.call(this);this.f="renderer";this.v=window.document.body;this.K=this.v.clientWidth;this.A=this.v.clientHeight;this.T=this.N=this.na=t;this.pb=new sg(nd);this.Ha=[];this.aa=t;this.Zd=this.hd=this.Xd=u;this.a=this.Vb=this.La=t;this.R={PROGRESSBAR_ENABLED:q,INTERMEDIATE_RENDERING:u,SLICENAVIGATORS:q};this.He=-1;window.console.log("XTK release 10 -- 2015-01-14 14:18:53 -- http://www.goXTK.com -- @goXTK")}C(Kg,M);w=Kg.prototype;
w.Ef=function(){window.cancelAnimationFrame(this.He);this.R.PROGRESSBAR_ENABLED&&(this.Vb=new Hg(this.v,3))};w.Ff=function(){this.R.PROGRESSBAR_ENABLED&&this.Vb&&(Ig(this.Vb),this.Qd=Jg(function(){this.Qd=t;this.Vb&&(this.Vb.Fd(),this.Vb=t);this.hd=this.Zd=q;this.cc()}.bind(this),700))};w.Gf=function(a){this.Vb&&this.Vb.Od(100*a.Ad)};w.Dj=function(a){this.La&&this.La.Od(100*a.Ad)};w.tj=function(a){a!=t&&a instanceof ld&&a.D&&this.ub(a.D)};w.Ej=function(a){a!=t&&a instanceof md&&a.D&&this.remove(a.D)};
w.If=function(a){(a==t||!(a instanceof Ld))&&m(Error("Invalid hover event."))};w.ve=function(){var a=be(this.v);this.K=a.clientWidth;this.A=a.clientHeight;a=be(this.na);a.width=this.K;a.height=this.A;"renderer3D"==this.f&&(this.a.viewport(0,0,this.K,this.A),this.N.Ve=D.g.yf(D.g.Ed(),this.N.eg,this.na.width/this.na.height,1,1E4))};w.Jf=function(a){(a==t||!(a instanceof Kd))&&m(Error("Invalid scroll event."))};Kg.prototype.__defineGetter__("config",v("R"));
Kg.prototype.__defineGetter__("interactor",v("T"));Kg.prototype.__defineGetter__("camera",v("N"));Kg.prototype.__defineGetter__("loadingCompleted",v("hd"));Kg.prototype.__defineGetter__("container",v("v"));Kg.prototype.__defineSetter__("container",function(a){a==t&&m(Error("An ID to a valid container (<div>..) is required."));var b=a;na(b)&&(b=be(a));pa(b)&&1==b.nodeType||m(Error("Could not find the given container."));this.v=b});w=Kg.prototype;w.Nd=function(){this.N.reset()};
@@ -407,8 +407,8 @@ w.Ca=function(){this.Qa||m(Error("No 2D orientation set."));lh.u.Ca.call(this,"2
w.ub=function(a){lh.u.ub.call(this,a);var b=u;this.get(a.qa)&&(b=q);if(a instanceof P){var c=a.r,e=a.e,d=a.xa;if(e!=t&&e.r!=t&&e.r.j)this.ub(e);else if(d!=t&&d.r!=t&&d.r.j)this.aa.load(d,a);else{if(c!=t&&la(c))if(a.yc!=t){if(a.yc.xf!=c.length)return}else{b=0;e=c.length;for(b=0;b<e;b++)this.aa.load(c[b],a);return}else if(c!=t&&c.j){this.aa.load(a,a);return}this.Fa="X"==this.Qa?0:"Y"==this.Qa?1:2;this.bb=a.c[this.Fa].c;d=t;d=0==this.Fa?a.indexX:1==this.Fa?a.indexY:a.indexZ;c=a.c[this.Fa].c[d].jg;e=
a.c[this.Fa].c[d].ig;this.Uc=a.c[this.Fa].c[d].Vc;this.Rc=a.c[this.Fa].c[d].Gc;this.Tc=c;this.Qc=e;d=this.Vd;d.width=c;d.height=e;var f=this.fd;f.width=c;f.height=e;this.fg=d.getContext("2d");this.kg=f.getContext("2d");b||(this.pb.add(a),ph(this))}}};function ph(a){var b=Math.min(a.K/(a.Tc*a.Uc),a.A/(a.Qc*a.Rc));a.N.o[14]=b}w.Hj=aa();
w.Ih=function(a,b){var c=this.Ha[0],e=this.N.o,d=t,f=this.Tc,g=this.Qc,h=t,l=t;if("Y"==this.Qa)d=this.bb[parseInt(c.indexY,10)],h=d.Vc,l=d.Gc,this.Sb[0]="rgba(255,0,0,.3)",this.Sb[1]="rgba(0,0,255,.3)";else if("Z"==this.Qa)d=this.bb[parseInt(c.indexZ,10)],h=d.Vc,l=d.Gc,this.Sb[0]="rgba(255,0,0,.3)",this.Sb[1]="rgba(0,255,0,.3)";else{d=this.bb[parseInt(c.indexX,10)];h=d.Gc;l=d.Vc;this.Sb[0]="rgba(0,255,0,.3)";this.Sb[1]="rgba(0,0,255,.3)";var j=f,f=g,g=j}var k=1*e[12],e=-1*e[13],j=[this.K/2,this.A/
-2],h=f*h*this.xb,l=g*l*this.xb,n=j[0]-h/2,j=j[1]-l/2,n=n+k*this.xb,j=j+e*this.xb;return a>n&&a<n+h&&b>j&&b<j+l?(k=(a-n)/h*f,e=(b-j)/l*g,l=d.ei[4],"X"==this.Qa?(j=f-k,k=e,e=j):"Y"==this.Qa?k=f-k:"Z"==this.Qa&&(k=f-k,e=g-e),k=d.di+k*d.Vc,e=d.Yh+e*d.Gc,k=Qc(k,e,l,1),f=Rc(),cd(d.Rh,k,f),f=[Math.floor(f[0]),Math.floor(f[1]),Math.floor(f[2])],g=Rc(),cd(d.Sh,k,g),d=Math.floor((c.b[0].i[0]*g[0]+c.b[0].i[1]*g[1]+c.b[0].i[2]*g[2]+c.b[0].Te)/c.b[0].Sc),d>=c.b[0].p?d=c.b[0].p-1:0>d&&(d=0),k=Math.floor((c.b[1].i[0]*
-g[0]+c.b[1].i[1]*g[1]+c.b[1].i[2]*g[2]+c.b[1].Te)/c.b[1].Sc),k>=c.b[1].p?k=c.b[1].p-1:0>k&&(k=0),e=Math.floor((c.b[2].i[0]*g[0]+c.b[2].i[1]*g[1]+c.b[2].i[2]*g[2]+c.b[2].Te)/c.b[2].Sc),e>=c.b[2].p?e=c.b[2].p-1:0>e&&(e=0),[[d,k,e],[f[0],f[1],f[2]],[g[0],g[1],g[2]]]):t};
+2],h=f*h*this.xb,l=g*l*this.xb,n=j[0]-h/2,j=j[1]-l/2,n=n+k*this.xb,j=j+e*this.xb;return a>n&&a<n+h&&b>j&&b<j+l?(k=(a-n)/h*f,e=(b-j)/l*g,l=d.ei[4],"X"==this.Qa?(j=f-k,k=e,e=j):"Y"==this.Qa?k=f-k:"Z"==this.Qa&&(k=f-k,e=g-e),k=d.di+k*d.Vc,e=d.Yh+e*d.Gc,k=Qc(k,e,l,1),f=Rc(),cd(d.Rh,k,f),f=[Math.floor(f[0]),Math.floor(f[1]),Math.floor(f[2])],g=Rc(),cd(d.Sh,k,g),d=Math.round((c.b[0].i[0]*g[0]+c.b[0].i[1]*g[1]+c.b[0].i[2]*g[2]+c.b[0].Te)/c.b[0].Sc),d>=c.b[0].p?d=c.b[0].p-1:0>d&&(d=0),k=Math.round((c.b[1].i[0]*
+g[0]+c.b[1].i[1]*g[1]+c.b[1].i[2]*g[2]+c.b[1].Te)/c.b[1].Sc),k>=c.b[1].p?k=c.b[1].p-1:0>k&&(k=0),e=Math.round((c.b[2].i[0]*g[0]+c.b[2].i[1]*g[1]+c.b[2].i[2]*g[2]+c.b[2].Te)/c.b[2].Sc),e>=c.b[2].p?e=c.b[2].p-1:0>e&&(e=0),[[d,k,e],[f[0],f[1],f[2]],[g[0],g[1],g[2]]]):t};
w.dc=function(a,b){lh.u.dc.call(this,a,b);if(0!=this.pb.I.length){var c=this.Ha[0],e=t,e=0==this.Fa?c.indexX:1==this.Fa?c.indexY:c.indexZ,d=this.bb[parseInt(e,10)].jg,f=this.bb[parseInt(e,10)].ig;this.Uc=this.bb[parseInt(e,10)].Vc;this.Rc=this.bb[parseInt(e,10)].Gc;this.Tc=d;this.Qc=f;var g=this.K,h=this.A,l=this.N.o;this.a.save();this.a.clearRect(-g,-h,2*g,2*h);this.a.restore();this.xb=Math.max(l[14],1E-4);this.a.setTransform(this.xb,0,0,this.xb,0,0);var j=1*l[12],l=-1*l[13],k=t;c.e&&(k=c.e.$e);
var n=this.bb[parseInt(e,10)],s=n.G.Wb,n=n.e,r=t;n&&(r=n.Wb);var y=this.Tc,z=this.Qc,F=this.fg,G=this.kg,H=F.getImageData(0,0,y,z),B=G.getImageData(0,0,y,z),E=H.data,I=B.data,N=E.length,Q=c.U,O=c.W,S=c.fa,da=c.ea;if(this.Je!=e||this.U!=Q||this.W!=O||this.fa!=S||this.ea!=da||k&&!tg(k,this.lg,0)){var J=this.Vd;J.width=d;J.height=f;J=this.fd;J.width=d;J.height=f;d=0;do{var J=[0,0,0,0],f=[0,0,0,0],ba=s[d]/255*(c.ia-c.ra)+c.ra,ka=da-S,U=ka/2+S,V=0,V=ba<U-ka/2?0:ba>U+ka/2?255:255*(ba-(U-ka/2))/ka;ba>=Q&&
ba<=O&&(J=new R(c.Rb[0],c.Rb[1],c.Rb[2]),J=(new R(c.Pb[0],c.Pb[1],c.Pb[2])).scale(V).add(J.scale(255-V)),J=[Math.floor(J.x),Math.floor(J.y),Math.floor(J.d),255],n&&(-255==k[3]?f=[r[d],r[d+1],r[d+2],r[d+3]]:tg(k,r,d)&&(f=[r[d],r[d+1],r[d+2],r[d+3]])));"X"==this.Qa?(E[d]=J[0],E[d+1]=J[1],E[d+2]=J[2],E[d+3]=J[3],I[d]=f[0],I[d+1]=f[1],I[d+2]=f[2],I[d+3]=f[3]):"Y"==this.Qa?(V=Math.floor(d/(4*y)),V=4*V*y+(4*(y-1)-(d-4*V*y)),E[V]=J[0],E[V+1]=J[1],E[V+2]=J[2],E[V+3]=J[3],I[V]=f[0],I[V+1]=f[1],I[V+2]=f[2],

0 comments on commit a5d618a

Please sign in to comment.