mirror of https://github.com/axmolengine/axmol.git
Fix web engine issues in test cases
This commit is contained in:
parent
1980311204
commit
05dd3bb608
|
@ -253,8 +253,11 @@ var TouchAllAtOnce = EventTest.extend({
|
||||||
var touch = touches[i];
|
var touch = touches[i];
|
||||||
var pos = touch.getLocation();
|
var pos = touch.getLocation();
|
||||||
var id = touch.getID();
|
var id = touch.getID();
|
||||||
var force = touch.getCurrentForce();
|
var force = 0, maxForce = 0;
|
||||||
var maxForce = touch.getMaxForce();
|
if (touch.getCurrentForce) {
|
||||||
|
force = touch.getCurrentForce();
|
||||||
|
maxForce = touch.getMaxForce();
|
||||||
|
}
|
||||||
cc.log("Touch #" + i + ". onTouchesMoved at: " + pos.x + " " + pos.y + " Id:" + id + " current force:" + force + " maximum postible force:" + maxForce);
|
cc.log("Touch #" + i + ". onTouchesMoved at: " + pos.x + " " + pos.y + " Id:" + id + " current force:" + force + " maximum postible force:" + maxForce);
|
||||||
target.update_id(id, pos);
|
target.update_id(id, pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ var SceneTestLayer1 = cc.Layer.extend({
|
||||||
var item1 = new cc.MenuItemFont("Test pushScene", this.onPushScene, this);
|
var item1 = new cc.MenuItemFont("Test pushScene", this.onPushScene, this);
|
||||||
var item2 = new cc.MenuItemFont("Test pushScene w/transition", this.onPushSceneTran, this);
|
var item2 = new cc.MenuItemFont("Test pushScene w/transition", this.onPushSceneTran, this);
|
||||||
var item3 = new cc.MenuItemFont("Quit", function () {
|
var item3 = new cc.MenuItemFont("Quit", function () {
|
||||||
cc.log("quit!")
|
cc.log("quit!");
|
||||||
}, this);
|
}, this);
|
||||||
var item4 = new cc.MenuItemFont("setNotificationNode", function () {
|
var item4 = new cc.MenuItemFont("setNotificationNode", function () {
|
||||||
var layerTemp = new cc.LayerColor(cc.color(0, 255, 255, 120));
|
var layerTemp = new cc.LayerColor(cc.color(0, 255, 255, 120));
|
||||||
|
@ -105,6 +105,7 @@ var SceneTestLayer1 = cc.Layer.extend({
|
||||||
},
|
},
|
||||||
onExit:function (sender) {
|
onExit:function (sender) {
|
||||||
cc.director.setNotificationNode(null);
|
cc.director.setNotificationNode(null);
|
||||||
|
this._super();
|
||||||
}
|
}
|
||||||
|
|
||||||
//CREATE_NODE(SceneTestLayer1);
|
//CREATE_NODE(SceneTestLayer1);
|
||||||
|
|
2
web
2
web
|
@ -1 +1 @@
|
||||||
Subproject commit d176dc4f74396746445112d030c2fa63875e5bf8
|
Subproject commit 29e12e52e4d8f47aa5a256967613b353fbbb424d
|
Loading…
Reference in New Issue