Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

have label be clickable too when selecting animation to export

Scott Petrovicb1daefc6fb44
diff --git a/src/lib/AnimationSearch.ts b/src/lib/AnimationSearch.ts
index b524251..2ed1912 100644
--- a/src/lib/AnimationSearch.ts
+++ b/src/lib/AnimationSearch.ts
@@ -139,10 +139,10 @@ export class AnimationSearch {
<button class="secondary-button play" data-index="${original_index}" style="display: flex; flex-direction:column">
<div class="anim-preview-placeholder" data-src="../animpreviews/${preview_folder}/${theme_name}_${anim_name}.webm" style="pointer-events: none;"></div>
</button>
- <div class="styled-checkbox">
+ <label class="styled-checkbox">
<input type="checkbox" name="${animation_clip.name}" value="${original_index}" ${checked_attribute}>
<span class="anim-preview-label">${this.animation_name_clean(animation_clip.name)}</span>
- </div>
+ </label>
</div>`
})
diff --git a/src/styles.css b/src/styles.css
index f1c0db4..d7746d8 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -310,7 +310,7 @@ option {
gap: 0.25rem;
flex-wrap: wrap;
overflow-x: hidden;
- width: 25.7rem; /* createss 3 column of animation items */
+ width: 23.7rem; /* createss 3 column of animation items */
}
#animations-items div {
@@ -332,12 +332,13 @@ option {
padding: 0;
/* specify dimensions helps grid layout without jumbling elements */
- width: 100px;
- height: 153px;
+ width: 102px;
+ height: 160px;
}
.anim-preview-label {
font-size: 75%;
+ cursor: pointer;
}
@@ -448,8 +449,9 @@ input[type="file"] {
.styled-checkbox {
display: flex;
align-items: center;
- gap: 0; /* Space between checkbox and label */
+ gap: 0.2rem; /* Space between checkbox and label */
margin-bottom: 0.4rem;
+ margin-top: 0.4rem;
}
.styled-checkbox input[type="checkbox"] {