"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[2936],{22936:function(e,t,n){n.r(t),n.d(t,{doAfterAttach:function(){return f}});var r=n(32723),a=n(34795),s=n(81073),i=n(54685),c=n(40909);function o(e){return u.apply(this,arguments)}function u(){return(u=(0,a.Z)((0,r.Z)().mark((function e(t){var n,a,i,o,u,f;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,s.getContainingTrack)(t),a=n.rpcSessionId,i=(0,s.getSession)(t),o=i.rpcManager,(u=(0,s.getContainingView)(t)).initialized&&!t.error&&!t.regionTooLarge){e.next=5;break}return e.abrupt("return");case 5:return t.setLoading(!0),e.next=8,o.call(a,"PileupGetReducedFeatures",{sessionId:a,regions:u.staticBlocks.contentBlocks,filterBy:(0,c.getSnapshot)(t.filterBy),adapterConfig:t.adapterConfig});case 8:f=e.sent,t.setChainData(f),t.setLoading(!1);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e,t){function n(n){var r=e.ref;if(r){var a=r.getContext("2d");a&&e.chainData&&(a.clearRect(0,0,r.width,2*e.height),a.resetTransform(),a.scale(2,2),t(e,a,r.width,e.height),e.setLastDrawnOffsetPx(n.offsetPx),e.setLastDrawnBpPerPx(n.bpPerPx))}}(0,i.$X)(e,(0,a.Z)((0,r.Z)().mark((function t(){return(0,r.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o(e);case 2:case"end":return t.stop()}}),t)}))),{delay:1e3}),(0,i.$X)(e,(0,a.Z)((0,r.Z)().mark((function t(){var a;return(0,r.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(a=(0,s.getContainingView)(e)).bpPerPx!==e.lastDrawnBpPerPx&&n(a);case 2:case"end":return t.stop()}}),t)})))),(0,i.$X)(e,(0,a.Z)((0,r.Z)().mark((function t(){return(0,r.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n((0,s.getContainingView)(e));case 2:case"end":return t.stop()}}),t)}))),{delay:1e3})}}}]);
//# sourceMappingURL=2936.e339f2b0.chunk.js.map