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: "/home/user/.feedingit/640fb167aca8bf5318ed721c5162f5eb.d/56a86b6b1675716ab54db83b1a78ab4c.html"
25 preferredWidth: flickable.width
26 preferredHeight: flickable.height
27 settings.defaultFontSize: 32
31 //width: parent.width; height: parent.height;
34 // anchors.fill: parent
36 //onLoadFinished: {console.log("Hello"); url="javascript:void(document.body.style.background='red');" }
37 onLoadFinished: {console.log(url);/* url="javascript:(function() { " +
38 "document.getElementsByTagName('body')[0].style.background = 'red'; " +
39 "})()"; console.log(url);*/ /*heuristicZoom(0,0,100)*/ }
43 id: slider; visible: true
47 property real prevScale: 1
49 bottom: parent.bottom; bottomMargin: 65
50 left: parent.left; leftMargin: 25
51 right: parent.right; rightMargin: 25
54 if (webView.width * value > flickable.width) {
55 var xoff = (flickable.width/2 + flickable.contentX) * value / prevScale;
56 flickable.contentX = xoff - flickable.width/2;
58 if (webView.height * value > flickable.height) {
59 var yoff = (flickable.height/2 + flickable.contentY) * value / prevScale;
60 flickable.contentY = yoff - flickable.height/2;
64 Component.onCompleted: { value=0; value=1; }