Skip to content

Commit

Permalink
fix spine set node size to 0 (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhakesi authored Jan 2, 2022
1 parent daf42d5 commit cf6b3db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion engine/jsb-spine-skeleton.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ const cacheManager = require('./jsb-cache-manager');
};

skeleton.setSkeletonData = function (skeletonData) {
null != skeletonData.width && null != skeletonData.height && this.node.setContentSize(skeletonData.width, skeletonData.height);
if (null != skeletonData.width && null != skeletonData.height && 0 !== skeletonData.width && 0 !== skeletonData.height) {
this.node.setContentSize(skeletonData.width, skeletonData.height);
}

let uuid = skeletonData._uuid;
if (!uuid) {
Expand Down

0 comments on commit cf6b3db

Please sign in to comment.