More tweaks to the on-going tension between giving machine elements focus (especially problematic when there are multiple machines) and preventing the page from being yanked around

This commit is contained in:
Jeff Parsons 2016-10-23 09:24:26 -07:00 committed by Jeff Parsons
commit 9ecb9e948f
15 changed files with 123 additions and 120 deletions

View file

@ -120,7 +120,7 @@ var Tc=[],lc=[B.prototype.Ea,B.prototype.tc,B.prototype.sb,B.prototype.Cd,B.prot
if(Ab)var kc=[B.prototype.Ca,B.prototype.Ub,B.prototype.Tb,B.prototype.qd,B.prototype.Oa,B.prototype.ce],jc=[B.prototype.aa,B.prototype.ra,B.prototype.pa,B.prototype.ya,B.prototype.fa,B.prototype.va],Vc=[B.prototype.Ga,B.prototype.uc,B.prototype.Db,B.prototype.Fd,B.prototype.cb,B.prototype.Xc];
function Wc(a,b){bb.call(this,"CPU",a,Wc,1);b=a.cycles||b;var c=a.multiplier||1;this.Y={};this.Y.Id=b;this.Y.Wd=c;this.Y.Ag=Math.round(this.Y.Id/1E4)/100;this.Y.He=this.Y.Ag*this.Y.Wd;this.la.Ib=!1;this.la.yi=!1;this.la.Cf=a.autoStart;this.la.oj=!1;this.la.Xe=!1;this.Y.Lf=this.Y.kf=0;this.Y.Mf=a.csStart;this.Y.jf=a.csInterval;this.Y.lf=a.csStop;this.Ai=this.Ne.bind(this);xb(this)}jb(Wc);var Xc=["power","reset"];l=Wc.prototype;
l.Ic=function(a,b,c,d){this.X=a;this.ga=b;this.ha=d;for(b=0;b<Xc.length;b++)(c=this.qa[Xc[b]])&&this.X.Pb(null,Xc[b],c);this.Tb=Jb(a,"FPU");this.N=Jb(a,"ChipSet");a=Yc(a,"autoStart");null!=a&&(this.la.Cf="true"==a?!0:"false"==a?!1:!!a);xb(this)};l.reset=function(){};l.save=function(){return null};l.restore=function(){return!1};
l.hc=function(a,b){if(!b){if(a&&this.restore){Zc(this);if(!this.restore(a))return!1;$c(this)}else this.reset();this.ha?this.ha.qh():this.O("No debugger detected")}ad(this);return!0};l.gc=function(a){return a?this.save():!0};l.Cf=function(){return this.la.Cf||!this.ha&&void 0===this.qa.run?(this.Ne(!0),!0):!1};l.vj=function(){return 0};
l.hc=function(a,b){if(!b){if(a&&this.restore){Zc(this);if(!this.restore(a))return!1;$c(this)}else this.reset();this.ha?this.ha.qh():this.O("No debugger detected")}ad(this);return!0};l.gc=function(a){return a?this.save():!0};l.Cf=function(){return this.la.Cf||!this.ha&&void 0===this.qa.run?(this.Ne(),!0):!1};l.vj=function(){return 0};
function $c(a){void 0===a.Y.Mf&&(a.Y.Mf=0);void 0===a.Y.jf&&(a.Y.jf=-1);void 0===a.Y.lf&&(a.Y.lf=-1);a.la.Xe=0<=a.Y.Mf&&0<a.Y.jf;a.la.Xe&&(a.Y.Lf=0,a.Y.kf=a.Y.Mf-a.uc)}function bd(a,b){if(a.la.Xe){var c=!1;a.Y.Lf=a.Y.Lf+a.vj()|0;a.Y.kf-=b;0>=a.Y.kf&&(a.Y.kf+=a.Y.jf,c=!0);0<=a.Y.lf&&a.Y.lf<=cd(a)&&(a.Y.jf=a.Y.lf=-1,$c(a),a.Wb(),c=!0);c&&a.O(cd(a)+" cycles: checksum="+r(a.Y.Lf))}}
l.Pb=function(a,b,c){var d=this;a=!1;switch(b){case "power":case "reset":this.qa[b]=c;a=!0;break;case "run":this.qa[b]=c;c.onclick=function(){var a;if(a=d.X)if(a=d.X,a.la.ic)a=!0;else{var b=null,c,h=nb(a.id);for(c=0;c<h.length&&(b=h[c],b===a||b.la.ready);c++);if(c==h.length)for(c=0;c<h.length&&(b=h[c],b===a||b.la.ic);c++);c==h.length&&(b=a);w("The "+b.type+" component ("+b.id+") is not "+(b.la.ready?"powered yet":"ready yet"+(b.yg?" (waiting for notification)":""))+".");a=!1}a&&(d.la.Ib?d.Wb(!0):
d.Ne(!0))};a=!0;break;case "speed":this.qa[b]=c;a=!0;break;case "setSpeed":this.qa[b]=c,c.onclick=function(){dd(d,d.Y.Wd<<1,!0)},c.textContent=this.Y.He.toFixed(2)+"Mhz",a=!0}return a};function ed(a,b){a.la.Ib&&(b=a.A-b,a.A-=b,a.fb-=b)}function fd(a,b,c){a.uc+=b;c&&(a.fb=a.A=0)}