~robertcarr/unity/phablet-integrate-mir-api-changes

« back to all changes in this revision

Viewing changes to Revealer.qml

  • Committer: Vesa Rautiainen
  • Date: 2012-10-22 18:24:10 UTC
  • mfrom: (28.1.12 demo)
  • Revision ID: vesa.rautiainen@canonical.com-20121022182410-8s3zhi734foof60h
Merge from branch where side stage was developed

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
    property real dragVelocity: draggingArea.dragVelocity != 0 ? Math.abs(draggingArea.dragVelocity) : -1
18
18
    property real dragVelocityThreshold: units.dp(40)
19
19
    property bool dragging: false
20
 
    property int lateralPosition
 
20
    property int lateralPosition: draggingArea.lateralPosition
21
21
    property real dragPosition
22
22
 
23
23
    signal openPressed
113
113
        }
114
114
    }
115
115
 
116
 
    function __computeLateralValue() {
117
 
        if (revealer.target.shown) {
118
 
            return rightDraggingArea.lateralPosition
119
 
        } else {
120
 
            return leftDraggingArea.lateralPosition
121
 
        }
122
 
    }
123
 
 
124
116
    Binding {
125
117
        id: dragBinding
126
118
 
130
122
        when: dragging
131
123
    }
132
124
 
133
 
    Binding {
134
 
        id: lateralPositionBinding
135
 
 
136
 
        target: revealer
137
 
        property: "lateralPosition"
138
 
        value: __computeLateralValue(dragPosition)
139
 
        when: true
140
 
    }
141
 
 
142
125
    SmoothedAnimation {
143
126
        id: hintingAnimation
144
127