diff --git a/src/editor/webview/assets/interaction.js b/src/editor/webview/assets/interaction.js index 8226538..babb5c8 100644 --- a/src/editor/webview/assets/interaction.js +++ b/src/editor/webview/assets/interaction.js @@ -284,7 +284,7 @@ function scrollMinimapToMouse(e){ function fit(){var w=mc.width/(window.devicePixelRatio||1);sc=(w-M.l-M.r)/(TD||1e-3);ox=0;clampView();draw();if(typeof drawKs==='function')drawKs();drawMinimap();} function nice(r){var ms=[1,2,5,10,20,50,100,200,500,1000,2000,5000,10000,20000,50000]; for(var i=0;i=r)return ms[i]*b}return 1000*Math.pow(10,Math.floor(Math.log10(r)))} -function fmtT(v){if(v>=1)return v.toFixed(3);if(v>=0.001)return v.toFixed(3);return v.toExponential(2)} +function fmtT(v){if(v===0)return'0';if(v>=0.001)return v.toFixed(3);return v.toExponential(2)} function fmtAmp(v){if(v>=1e6)return(v/1e6).toFixed(1)+'M';if(v>=1e3)return(v/1e3).toFixed(1)+'k';if(v>=1)return v.toFixed(1);return v.toFixed(2)} function sampleGradAtTime(g,t){ if(!g||g.ty==='none'||!g.t||!g.w||g.t.length<2||g.w.length<2||!isFinite(t))return 0;