From 4bf56e5853d0cb33e0a6a010215834a5ba97fc20 Mon Sep 17 00:00:00 2001 From: zhangcheng Date: Thu, 8 Oct 2015 11:35:43 +0800 Subject: [PATCH] Fix #23337 Hide menu "cocostudio 2.1", because cocostudio 1.6 Api can't load json exported from cocostudio 2.x. --- .../js-tests/src/CocoStudioTest/ParserTest/ParserTest.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js b/tests/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js index f59b8ec35c..2ce7d108be 100644 --- a/tests/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js +++ b/tests/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js @@ -125,8 +125,13 @@ var CocostudioParserJsonScene = cc.Scene.extend({ pMenu.y = 0; cc.MenuItemFont.setFontName("fonts/arial.ttf"); cc.MenuItemFont.setFontSize(24); - - for (var i = 0; i < g_parsersTests.length; ++i) { + var testNum = 0; + if(cocoStudioOldApiFlag == 0){ + testNum = g_parsersTests.length; + }else{ + testNum = g_parsersTests.length - 1; + } + for (var i = 0; i < testNum; ++i) { var selItem = g_parsersTests[i]; var pItem = new cc.MenuItemFont(selItem.title, selItem.test, this);