~mihirsoni/ubuntu-calendar-app/1291906

« back to all changes in this revision

Viewing changes to EventLayoutHelper.js

  • Committer: Kunal Parmar
  • Date: 2014-06-07 03:21:13 UTC
  • mto: This revision was merged to the branch mainline in revision 312.
  • Revision ID: pkunal.parmar@gmail.com-20140607032113-cnziutd4v4v0i1qx
removed unnecessary sort

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
        //finds all schedules overlapping with current schedule and remove from original array
10
10
        var schs = findOverlappingSchedules(sch, allSchs);
11
 
        schs.push(sch);
12
11
 
13
 
        //schs contains all schedules overlapping with current schedules
14
 
        //now short those schedules from longest to shortest
15
 
        schs.sort(sortFunc);
 
12
        //insert original schedule first, so array remain sorted
 
13
        schs.unshift(sch);
16
14
 
17
15
        //assign position to schedules with respest to their duration and  start time
18
16
        var array = [];