diff --git a/qml/CardShell.qml b/qml/CardShell.qml index 8024f2c..6d8251a 100644 --- a/qml/CardShell.qml +++ b/qml/CardShell.qml @@ -111,22 +111,18 @@ Rectangle { fingerSize: Units.gu(5) minimalFlickLength: Units.gu(10) timeout: 2000 - height: root.height - width: root.width - - function convertRawPos(pos) { - return mapFromItem(root, pos.x, pos.y); - } + height: orientationHelper.height + width: orientationHelper.width signal screenEdgeFlickEdgeLeft(bool timeout,point pos) signal screenEdgeFlickEdgeRight(bool timeout, point pos) signal screenEdgeFlickEdgeTop(bool timeout,point pos) signal screenEdgeFlickEdgeBottom(bool timeout, point pos) -// onTouchBegin: orientationHelper.setLocked(true); -// onTouchEnd: orientationHelper.setLocked(false); + onTouchBegin: orientationHelper.setLocked(true); + onTouchEnd: orientationHelper.setLocked(false); onGestureEvent: (gestureType, pos, timeout) => { - var screenPos = convertRawPos(pos); + var screenPos = orientationHelper.convertRawPos(pos); switch (gestureType) { case GestureHandler.TapGesture: