瀏覽代碼

offered the possibility to change animation names

Raanan Weber 7 年之前
父節點
當前提交
bdedff86a8
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      Viewer/assets/templates/default/navbar.html
  2. 1 1
      Viewer/src/viewer/defaultViewer.ts

+ 2 - 2
Viewer/assets/templates/default/navbar.html

@@ -477,10 +477,10 @@
             </button>
             <div class="menu-options">
                 {{#each animations}} {{#unless (eq ../selectedAnimation (add @index 1))}}
-                <button class="flex-container label-option-button animation-buttons" data-value="{{this}}">
+                <button class="flex-container label-option-button animation-buttons" data-value="{{this.value}}">
                     <!-- <div> -->
                     <span class="icon types-icon"></span>
-                    <span class="control-text animation-label">{{this}}</span>
+                    <span class="control-text animation-label">{{this.label}}</span>
                     <span class="control-text animation-number">{{add @index 1}}</span>
                     <!-- </div> -->
                 </button>

+ 1 - 1
Viewer/src/viewer/defaultViewer.ts

@@ -351,7 +351,7 @@ export class DefaultViewer extends AbstractViewer {
         } else {
 
             let animationNames = model.getAnimationNames();
-            newParams.animations = animationNames;
+            newParams.animations = animationNames.map(a => { return { label: a, value: a } });
             if (animationNames.length) {
                 this._isAnimationPaused = (model.configuration.animation && !model.configuration.animation.autoStart) || !model.configuration.animation;
                 this._animationList = animationNames;