Fixes setScale & setAnchorPoint could not work in js-tests -> webview test . (#16935)

This commit is contained in:
James Chen 2016-11-30 15:32:02 +08:00 committed by minggo
parent df13bc8856
commit 51efcb9365
1 changed files with 4 additions and 4 deletions

View File

@ -79,12 +79,12 @@ var UIWebViewTest = UIMainLayer.extend({
}},
{ name: "Scale", func: function(){
var scale = ((Math.random() * 0.5 + 0.2) * 100 | 0) / 100;
playState.setString("setScale(%f)!", scale);
playState.setString("setScale(" + scale + ")");
webView.setScale(scale);
}},
{ name: "setAnchorPoint", func: function(){
var anpX = video.getAnchorPoint().x === 1 ? 0: video.getAnchorPoint().x+ 0.5;
var anpY = video.getAnchorPoint().y === 1 ? 0: video.getAnchorPoint().y+ 0.5;
var anpX = webView.getAnchorPoint().x === 1 ? 0: webView.getAnchorPoint().x+ 0.5;
var anpY = webView.getAnchorPoint().y === 1 ? 0: webView.getAnchorPoint().y+ 0.5;
webView.setAnchorPoint(anpX, anpY);
}}
];