Lines Matching refs:ruler
381 base.exportTo("tracing.tracks",function(){var d=ui.define("ruler-track",tracing.tracks.HeadingTrack),b=Math.log(10);d.prototype={__proto__:tracing.tracks.HeadingTrack.prototype,decorate:function(a){tracing.tracks.HeadingTrack.prototype.decorate.call(this,a);this.classList.add("ruler-track");this.strings_secs_=[];this.strings_msecs_=[];this.addEventListener("mousedown",this.onMouseDown);this.viewportMarkersChange_=this.viewportMarkersChange_.bind(this);a.addEventListener("markersChange",this.viewportMarkersChange_)},
382 detach:function(){tracing.tracks.HeadingTrack.prototype.detach.call(this);this.viewport.removeEventListener("markersChange",this.viewportMarkersChange_)},viewportMarkersChange_:function(){2>this.viewport.markers.length?this.classList.remove("ruler-track-with-distance-measurements"):this.classList.add("ruler-track-with-distance-measurements")},onMouseDown:function(a){0===a.button&&this.placeAndBeginDraggingMarker(a.clientX)},placeAndBeginDraggingMarker:function(a){var b=window.devicePixelRatio||1;
385 e)}},drawSlices_:function(a,c){var e=this.context(),d=window.devicePixelRatio||1,g=this.getBoundingClientRect(),h=g.width*d,k=g.height*d,l=this.classList.contains("ruler-track-with-distance-measurements"),g=l?k/2:k,m=this.viewport;m.drawMarkerArrows(e,a,c,g);var d=150*d,n=m.xViewVectorToWorld(d),p,q,t,v;v=Math.pow(10,Math.ceil(Math.log(n)/b));q=[10,5,2,1];for(n=0;n<q.length;++n)if(!(m.xWorldVectorToView(v/q[n])<d)){p=v/q[n-1];break}v=void 0;100>p?(q="ms",t=1,v=this.strings_msecs_):(q="s",t=1E3,v=