~pkunal-parmar/ubuntu-calendar-app/ICalImport

« back to all changes in this revision

Viewing changes to PathViewBase.qml

  • Committer: Kunal Parmar
  • Date: 2013-09-16 14:04:01 UTC
  • mto: This revision was merged to the branch mainline in revision 119.
  • Revision ID: pkunal.parmar@gmail.com-20130916140401-nz4732sh94qgt394
dayview weekview transition added

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        PathLine { relativeX: root.width; relativeY: 0 }
17
17
    }
18
18
 
 
19
    // 0= current index, -1= previous index, 1 next index
 
20
    function indexType(index) {
 
21
        if (index === root.currentIndex) {
 
22
            return 0;
 
23
        }
 
24
 
 
25
        var previousIndex = root.currentIndex > 0 ? root.currentIndex - 1 : 2
 
26
        if ( index === previousIndex ) {
 
27
            return -1;
 
28
        }
 
29
 
 
30
        return 1;
 
31
    }
 
32
 
19
33
    onCurrentIndexChanged: {
20
34
        var diff = currentIndex - intern.previousIndex
21
35