diff --git a/cocos/scripting/js-bindings/script/studio/parsers/action-2.x.js b/cocos/scripting/js-bindings/script/studio/parsers/action-2.x.js index b4f4a89b32..dcf168a218 100644 --- a/cocos/scripting/js-bindings/script/studio/parsers/action-2.x.js +++ b/cocos/scripting/js-bindings/script/studio/parsers/action-2.x.js @@ -113,7 +113,7 @@ name: "Rotation", handle: function(options){ var frame = new ccs.RotationFrame(); - var rotation = options["Rotation"]; + var rotation = options["Rotation"] || options["Value"] || 0; frame.setRotation(rotation); return frame; } diff --git a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js index 0957cfb853..2c1a667455 100644 --- a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js +++ b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js @@ -104,7 +104,9 @@ var visible = getParam(json["VisibleForFrame"], true); node.setVisible(visible); - setContentSize(node, json["Size"]); + var size = json["Size"]; + if(size) + setContentSize(node, size); if (json["Alpha"] != null) node.setOpacity(json["Alpha"]); @@ -118,9 +120,7 @@ extensionData.setCustomProperty(customProperty); extensionData.setActionTag(actionTag); if (node.getComponent("ComExtensionData")) - { node.removeComponent("ComExtensionData"); - } node.addComponent(extensionData); node.setCascadeColorEnabled(true); @@ -294,9 +294,7 @@ extensionData.setCustomProperty(customProperty); extensionData.setActionTag(actionTag); if (widget.getComponent("ComExtensionData")) - { widget.removeComponent("ComExtensionData"); - } widget.addComponent(extensionData); var rotationSkewX = json["RotationSkewX"];