3 import "common" as Common
6 /*x: parent.width; height: parent.height;*/
7 width: flickable.width;
9 property alias zoomEnabled: slider.visible;
10 property alias value: slider.value;
11 //anchors.top: parent.top; anchors.bottom: parent.bottom;
16 //anchors.fill: screen;
17 height: parent.height;
19 contentWidth: webView.width*webView.scale; //Math.max(screen.width,webView.width*webView.scale)
20 contentHeight: Math.max(articleView.height,webView.height*webView.scale)
21 //contentWidth: childrenRect.width; contentHeight: childrenRect.height
22 interactive: parent.vertPanningEnabled;
24 flickDeceleration: 1500;
25 flickableDirection: Flickable.VerticalFlick
30 preferredWidth: articleView.width
31 //preferredHeight: articleView.height
33 transformOrigin: Item.TopLeft
35 settings.defaultFontSize: articleView.webviewFontSize
39 // console.log("start contentx"+contentX)
40 // console.log("start contenty"+contentY)
45 id: slider; visible: false
48 property real prevScale: 1
50 bottom: parent.bottom; bottomMargin: 65
51 left: parent.left; leftMargin: 25
52 right: parent.right; rightMargin: 25
55 if (webView.width * value > flickable.width) {
56 var xoff = (flickable.width/2 + flickable.contentX) * value / prevScale;
57 flickable.contentX = xoff - flickable.width/2;
59 if (webView.height * value > flickable.height) {
60 var yoff = (flickable.height/2 + flickable.contentY) * value / prevScale;
61 flickable.contentY = yoff - flickable.height/2;
65 Component.onCompleted: {value=0; value=1; }