瀏覽代碼

fix duration equal to 0 with overlay

lviguier 1 年之前
父節點
當前提交
4f5104841a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hide/comp/CurveEditor.hx

+ 1 - 1
hide/comp/CurveEditor.hx

@@ -1048,7 +1048,7 @@ class CurveEditor extends Component {
 			this.duration = duration;
 
 		var minX = xt(0) - 1;
-		var maxX = xt(this.duration);
+		var maxX = xt(this.duration == 0 ? 5000 : this.duration);
 		svg.line(overlayGroup, minX, svg.element.height(), minX, 0, { stroke:'#000000', 'stroke-width':'1px' });
 		svg.line(overlayGroup, maxX, svg.element.height(), maxX, 0, { stroke:'#000000', 'stroke-width':'1px' });
 		svg.rect(overlayGroup, 0, 0, xt(0), svg.element.height(), { 'fill':'#000000', opacity:0.3});