mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[ts][player] Improved check if only one skin/animation should be allowed and display buttons accordingly.
This commit is contained in:
parent
7f9617a50b
commit
ae6892cdfd
@ -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;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -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;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user