Эх сурвалжийг харах

[ts][player] Improved check if only one skin/animation should be allowed and display buttons accordingly.

badlogic 6 жил өмнө
parent
commit
ae6892cdfd

+ 2 - 2
spine-ts/build/spine-all.js

@@ -12100,9 +12100,9 @@ var spine;
 				};
 			}
 			this.setupInput();
-			if (skeletonData.skins.length == 1)
+			if (skeletonData.skins.length == 1 || (this.config.skins && this.config.skins.length == 1))
 				this.skinButton.classList.add("spine-player-hidden");
-			if (skeletonData.animations.length == 1)
+			if (skeletonData.animations.length == 1 || (this.config.animations && this.config.animations.length == 1))
 				this.animationButton.classList.add("spine-player-hidden");
 			this.config.success(this);
 			this.loaded = true;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
spine-ts/build/spine-all.js.map


+ 2 - 2
spine-ts/build/spine-player.js

@@ -11433,9 +11433,9 @@ var spine;
 				};
 			}
 			this.setupInput();
-			if (skeletonData.skins.length == 1)
+			if (skeletonData.skins.length == 1 || (this.config.skins && this.config.skins.length == 1))
 				this.skinButton.classList.add("spine-player-hidden");
-			if (skeletonData.animations.length == 1)
+			if (skeletonData.animations.length == 1 || (this.config.animations && this.config.animations.length == 1))
 				this.animationButton.classList.add("spine-player-hidden");
 			this.config.success(this);
 			this.loaded = true;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
spine-ts/build/spine-player.js.map


+ 2 - 2
spine-ts/player/src/Player.ts

@@ -969,8 +969,8 @@ module spine {
 			this.setupInput();
 
 			// Hide skin and animation if there's only the default skin / no animation
-			if (skeletonData.skins.length == 1) this.skinButton.classList.add("spine-player-hidden");
-			if (skeletonData.animations.length == 1) this.animationButton.classList.add("spine-player-hidden");
+			if (skeletonData.skins.length == 1 || (this.config.skins && this.config.skins.length == 1)) this.skinButton.classList.add("spine-player-hidden");
+			if (skeletonData.animations.length == 1 || (this.config.animations && this.config.animations.length == 1)) this.animationButton.classList.add("spine-player-hidden");
 
 			this.config.success(this);
 			this.loaded = true;

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно