equal
deleted
inserted
replaced
|
1 import Qt 4.7 |
|
2 import org.webkit 1.0 |
|
3 |
|
4 // Note that zooming is better done using zoomFactor and careful |
|
5 // control of rendering to avoid excessive re-rendering during |
|
6 // zoom animations. This test is written for simplicity. |
|
7 WebView { |
|
8 width: 200 |
|
9 height: 250 |
|
10 Behavior on x { NumberAnimation { } } |
|
11 Behavior on y { NumberAnimation { } } |
|
12 Behavior on scale { NumberAnimation { } } |
|
13 url: "zooming.html" |
|
14 preferredWidth: width |
|
15 preferredHeight: height |
|
16 onDoubleClick: {console.log(clickX,clickY);heuristicZoom(clickX,clickY,2)} |
|
17 onZoomTo: {console.log(zoom);scale=zoom;x=width/2-centerX;y=height/2-centerY} |
|
18 } |