diff --git a/extensions/dragonbones/ArmatureDisplay.js b/extensions/dragonbones/ArmatureDisplay.js index cfa215f4ea..fc3c5a8e18 100644 --- a/extensions/dragonbones/ArmatureDisplay.js +++ b/extensions/dragonbones/ArmatureDisplay.js @@ -273,10 +273,6 @@ dragonBones.ArmatureDisplay = cc.Class({ this._factory = new dragonBones.CCFactory(); }, - onDestroy : function () { - // TODO destroy the factory?? - }, - __preload : function () { this._parseDragonAsset(); this._parseDragonAtlasAsset(); @@ -363,7 +359,7 @@ dragonBones.ArmatureDisplay = cc.Class({ // update inspector this._updateArmatureEnum(); this._updateAnimEnum(); - this._refreshInspector(); + Editor.Utils.refreshSelectedInspector('node', this.node.uuid); } }, @@ -387,26 +383,6 @@ dragonBones.ArmatureDisplay = cc.Class({ setEnumAttr(this, '_defaultArmatureIndex', armatureEnum || DefaultArmaturesEnum); }, - // force refresh inspector - _refreshInspector: CC_EDITOR && function () { - var ga = Editor.Selection.curGlobalActivate(); - var inspecting = (ga && ga.id === this.node.uuid && ga.type === 'node'); - if (inspecting) { - Editor.Selection.unselect('node', this.node.uuid); - ga = Editor.Selection.curGlobalActivate(); - var id = this.node.uuid; - var inspectOther = (ga && ga.type === 'node' && ga.id); - if (inspectOther) { - setTimeout(function () { - Editor.Selection.select('node', id, false); - }, 200); - } - else { - Editor.Selection.select('node', id, false); - } - } - }, - /** * !#en * Play the specified animation. diff --git a/extensions/dragonbones/DragonBonesAsset.js b/extensions/dragonbones/DragonBonesAsset.js index 4891503916..ea87df1842 100644 --- a/extensions/dragonbones/DragonBonesAsset.js +++ b/extensions/dragonbones/DragonBonesAsset.js @@ -27,9 +27,6 @@ var DragonBonesAsset = cc.Class({ name: 'dragonBones.DragonBonesAsset', extends: cc.Asset, - ctor: function () { - }, - properties: { _dragonBonesJson : '', dragonBonesJson : { diff --git a/extensions/dragonbones/DragonBonesAtlasAsset.js b/extensions/dragonbones/DragonBonesAtlasAsset.js index c86cb8fe3d..f465ba778a 100644 --- a/extensions/dragonbones/DragonBonesAtlasAsset.js +++ b/extensions/dragonbones/DragonBonesAtlasAsset.js @@ -51,9 +51,6 @@ var DragonBonesAtlasAsset = cc.Class({ }, }, - ctor: function () { - }, - createNode: CC_EDITOR && function (callback) { var node = new cc.Node(this.name); var armatureDisplay = node.addComponent(dragonBones.ArmatureDisplay); diff --git a/extensions/spine/Skeleton.js b/extensions/spine/Skeleton.js index 384b68f013..d02a1dde42 100644 --- a/extensions/spine/Skeleton.js +++ b/extensions/spine/Skeleton.js @@ -804,25 +804,6 @@ sp.Skeleton = cc.Class({ // change enum setEnumAttr(this, '_defaultSkinIndex', skinEnum || DefaultSkinsEnum); }, - // force refresh inspector - _refreshInspector: CC_EDITOR && function () { - var ga = Editor.Selection.curGlobalActivate(); - var inspecting = (ga && ga.id === this.node.uuid && ga.type === 'node'); - if (inspecting) { - Editor.Selection.unselect('node', this.node.uuid); - ga = Editor.Selection.curGlobalActivate(); - var id = this.node.uuid; - var inspectOther = (ga && ga.type === 'node' && ga.id); - if (inspectOther) { - setTimeout(function () { - Editor.Selection.select('node', id, false); - }, 200); - } - else { - Editor.Selection.select('node', id, false); - } - } - }, /** * !#en Set the start event listener. @@ -923,7 +904,7 @@ sp.Skeleton = cc.Class({ // update inspector self._updateAnimEnum(); self._updateSkinEnum(); - self._refreshInspector(); + Editor.Utils.refreshSelectedInspector('node', this.node.uuid); } } }); diff --git a/modules.json b/modules.json index 4b413e89b9..8bd68ae055 100644 --- a/modules.json +++ b/modules.json @@ -189,5 +189,11 @@ "entries": [ "./cocos2d/core/graphics/index.js" ] + }, + { + "name": "DragonBones", + "entries": [ + "./extensions/dragonbones/index.js" + ] } ]