Browse Source

Fixed reading inherit scale and rotation.

NathanSweet 11 years ago
parent
commit
b0da7d0e52
1 changed files with 2 additions and 2 deletions
  1. 2 2
      spine-as3/spine-as3/src/spine/SkeletonJson.as

+ 2 - 2
spine-as3/spine-as3/src/spine/SkeletonJson.as

@@ -99,8 +99,8 @@ public class SkeletonJson {
 			boneData.rotation = (boneMap["rotation"] || 0);
 			boneData.scaleX = boneMap.hasOwnProperty("scaleX") ? boneMap["scaleX"] : 1;
 			boneData.scaleY = boneMap.hasOwnProperty("scaleY") ? boneMap["scaleY"] : 1;
-			boneData.inheritScale = !boneMap["inheritScale"] || boneMap["inheritScale"] == "true";
-			boneData.inheritRotation = !boneMap["inheritRotation"] || boneMap["inheritRotation"] == "true";
+			boneData.inheritScale = boneMap.hasOwnProperty("inheritScale") ? boneMap["inheritScale"] : true;
+			boneData.inheritRotation = boneMap.hasOwnProperty("inheritRotation") ? boneMap["inheritRotation"] : true;
 			skeletonData.addBone(boneData);
 		}