private void UpdateCurve() { if (Curve == null || Timeline == null) { return; } Curve.Bounds = new Rectangle(Timeline.StartOffset, Y + 1.0f, Timeline.Duration * Timeline.UnitsPerSecond * Timeline.Zoom, Height - 2.0f); var expanded = IsExpanded; Curve.ViewScale = new Vector2(Timeline.Zoom, Curve.ViewScale.Y); Curve.ShowCollapsed = !expanded; Curve.ShowBackground = expanded; Curve.ShowAxes = expanded; Curve.Visible = Visible; Curve.UpdateKeyframes(); }
private void UpdateCurve() { if (Curve == null || Timeline == null) { return; } bool wasVisible = Curve.Visible; Curve.Visible = Visible; if (!Visible) { if (wasVisible) { Curve.ClearSelection(); } return; } var expanded = IsExpanded; Curve.KeyframesEditorContext = Timeline; Curve.CustomViewPanning = Timeline.OnKeyframesViewPanning; Curve.Bounds = new Rectangle(Timeline.StartOffset, Y + 1.0f, Timeline.Duration * Timeline.UnitsPerSecond * Timeline.Zoom, Height - 2.0f); Curve.ViewScale = new Float2(Timeline.Zoom, Curve.ViewScale.Y); Curve.ShowCollapsed = !expanded; Curve.ShowAxes = expanded ? CurveEditorBase.UseMode.Horizontal : CurveEditorBase.UseMode.Off; Curve.EnableZoom = expanded ? CurveEditorBase.UseMode.Vertical : CurveEditorBase.UseMode.Off; Curve.EnablePanning = expanded ? CurveEditorBase.UseMode.Vertical : CurveEditorBase.UseMode.Off; Curve.ScrollBars = expanded ? ScrollBars.Vertical : ScrollBars.None; Curve.UpdateKeyframes(); if (expanded) { if (_splitter == null) { _splitter = new Splitter { _track = this, Parent = Curve, }; } var splitterHeight = 5.0f; _splitter.Bounds = new Rectangle(0, Curve.Height - splitterHeight, Curve.Width, splitterHeight); } }
private void UpdateCurve() { if (Curve == null || Timeline == null) { return; } var expanded = IsExpanded; Curve.Bounds = new Rectangle(Timeline.StartOffset, Y + 1.0f, Timeline.Duration * Timeline.UnitsPerSecond * Timeline.Zoom, Height - 2.0f); Curve.ViewScale = new Vector2(Timeline.Zoom, Curve.ViewScale.Y); Curve.ShowCollapsed = !expanded; Curve.ShowBackground = expanded; Curve.ShowAxes = expanded; Curve.EnableZoom = expanded ? CurveEditorBase.UseMode.Vertical : CurveEditorBase.UseMode.Off; Curve.EnablePanning = expanded ? CurveEditorBase.UseMode.Vertical : CurveEditorBase.UseMode.Off; Curve.ScrollBars = expanded ? ScrollBars.Vertical : ScrollBars.None; Curve.Visible = Visible; Curve.UpdateKeyframes(); }
private void UpdateCurve() { if (Curve == null || Timeline == null) { return; } Curve.Visible = Visible; if (!Visible) { return; } var expanded = IsExpanded; Curve.Bounds = new Rectangle(Timeline.StartOffset, Y + 1.0f, Timeline.Duration * Timeline.UnitsPerSecond * Timeline.Zoom, Height - 2.0f); Curve.ViewScale = new Vector2(Timeline.Zoom, Curve.ViewScale.Y); Curve.ShowCollapsed = !expanded; Curve.ShowBackground = expanded; Curve.ShowAxes = expanded; Curve.EnableZoom = expanded ? CurveEditorBase.UseMode.Vertical : CurveEditorBase.UseMode.Off; Curve.EnablePanning = expanded ? CurveEditorBase.UseMode.Vertical : CurveEditorBase.UseMode.Off; Curve.ScrollBars = expanded ? ScrollBars.Vertical : ScrollBars.None; Curve.UpdateKeyframes(); if (expanded) { if (_splitter == null) { _splitter = new Splitter { _track = this, Parent = Curve, } } ; var splitterHeight = 4.0f; _splitter.Bounds = new Rectangle(0, Curve.Height - splitterHeight, Curve.Width, splitterHeight); } }