Ejemplo n.º 1
0
        private void Draging(Event e)
        {
            TimeAreaView timeAreaView = window.GetPartialView <TimeAreaView>();

            ShowRect.x    += e.delta.x;
            Clip.StartTime = timeAreaView.PiexlToTime(ShowRect.x);
            Clip.StartTime = Mathf.Max(0, Clip.StartTime);
            e.Use();

            OnDraging();
        }
Ejemplo n.º 2
0
        private void DragEnd(Event e)
        {
            TimeAreaView timeAreaView = window.GetPartialView <TimeAreaView>();

            ShowRect.x  = timeAreaView.TimeToPixel(Clip.EndTime);
            ShowRect.x += e.delta.x;

            var end = timeAreaView.PiexlToTime(ShowRect.x);

            if (end > Clip.StartTime)
            {
                Clip.DurationTime += (end - Clip.EndTime);
                e.Use();
            }

            OnDragEnd();
        }
Ejemplo n.º 3
0
        private void DragStart(Event e)
        {
            TimeAreaView timeAreaView = window.GetPartialView <TimeAreaView>();

            ShowRect.x  = timeAreaView.TimeToPixel(Clip.StartTime);
            ShowRect.x += e.delta.x;

            var start2 = timeAreaView.PiexlToTime(ShowRect.x);

            if (start2 >= 0 && start2 <= Clip.EndTime)
            {
                Clip.DurationTime -= (start2 - Clip.StartTime);
                Clip.StartTime     = Mathf.Max(0, start2);
                e.Use();
            }

            OnDragStart();
        }