mirror of https://github.com/axmolengine/axmol.git
Fixes setScale & setAnchorPoint could not work in js-tests -> webview test . (#16935)
This commit is contained in:
parent
df13bc8856
commit
51efcb9365
|
@ -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);
|
||||
}}
|
||||
];
|
||||
|
@ -104,4 +104,4 @@ var UIWebViewTest = UIMainLayer.extend({
|
|||
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue