3 import "common" as Common
9 //anchors.top: parent.top; anchors.bottom: parent.bottom;
12 property string url: "";
15 //anchors.fill: screen;
16 height: parent.height;
18 contentWidth: webView.width*scale; //Math.max(screen.width,webView.width*webView.scale)
19 contentHeight: Math.max(parent.height,webView.height*webView.scale)
23 //url: "http://www.google.com";
24 //url: "http://www.viedemerde.fr/inclassable/5873986?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+viedemerde+%28Vie+de+merde%29"
25 url: "/home/ymarcoz/.feedingit/361f6abe590be9c681b5489e5d48331c.d/1b1033c75378fb19a8a70151d764cd33.html"
26 preferredWidth: flickable.width
27 preferredHeight: flickable.height
28 settings.defaultFontSize: 32
32 //width: parent.width; height: parent.height;
35 // anchors.fill: parent
37 //onLoadFinished: {console.log("Hello"); url="javascript:void(document.body.style.background='red');" }
38 onLoadFinished: {console.log(url);/* url="javascript:(function() { " +
39 "document.getElementsByTagName('body')[0].style.background = 'red'; " +
40 "})()"; console.log(url);*/ /*heuristicZoom(0,0,100)*/ }
44 id: slider; visible: true
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; }