From bc42a8a7cfc6efadc44ce7ef6e5a829bd9c1fee2 Mon Sep 17 00:00:00 2001 From: chenxianyin <420373550@qq.com> Date: Mon, 21 May 2018 14:09:43 +0800 Subject: [PATCH] Issue fixes for audio preload and Scale9Sprite.FillType (#2707) * fix audio reload error, more preload call won't create more WebAudioElement yet. * fix JSB cc.Scale9Sprite.FillType error. --- cocos2d/audio/CCAudio.js | 3 +++ jsb/jsb-scale9sprite.js | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cocos2d/audio/CCAudio.js b/cocos2d/audio/CCAudio.js index 9812dad57b..c6415d251c 100644 --- a/cocos2d/audio/CCAudio.js +++ b/cocos2d/audio/CCAudio.js @@ -100,6 +100,9 @@ Audio.State = { if (this._element) return; + if (this._element) + return; + var item = cc.loader.getItem(src); if (!item) { diff --git a/jsb/jsb-scale9sprite.js b/jsb/jsb-scale9sprite.js index 95e509a44f..ffc00af613 100644 --- a/jsb/jsb-scale9sprite.js +++ b/jsb/jsb-scale9sprite.js @@ -59,9 +59,8 @@ cc.Scale9Sprite.RenderingType = cc.Enum({ }); cc.Scale9Sprite.FillType = cc.Enum({ - Horizontal: 0, - Vertical: 1, - //todo implement this + HORIZONTAL: 0, + VERTICAL: 1, RADIAL:2, });