diff Applications/StoneWebViewer/WebApplication/index.html @ 1820:5baaad557d58

don't change mouse tool after creating an annotation
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 May 2021 13:08:49 +0200
parents b81775f1b196
children a56bf4c534ef
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/index.html	Wed May 26 13:08:15 2021 +0200
+++ b/Applications/StoneWebViewer/WebApplication/index.html	Wed May 26 13:08:49 2021 +0200
@@ -353,30 +353,34 @@
                 
                 <div class="tbGroup__buttons--bottom" v-show="mouseActionsVisible">
                   <div class="inline-object" v-if="globalConfiguration.CombinedToolEnabled">
-                    <button class="wvButton"
+                    <button class="wvButton--underline"
                             data-toggle="tooltip" data-title="Combined tool"
+                            v-bind:class="{ 'active' : mouseTool == MOUSE_TOOL_COMBINED }"
                             @click="SetCombinedToolActions()">
                       <i class="far fa-hand-point-up"></i>
                     </button>
                   </div>
                   <div class="inline-object">
-                    <button class="wvButton"
+                    <button class="wvButton--underline"
                             data-toggle="tooltip" data-title="Zoom"
-                            @click="SetMouseButtonActions(stone.WebViewerAction.ZOOM, stone.WebViewerAction.ZOOM, stone.WebViewerAction.ZOOM)">
+                            v-bind:class="{ 'active' : mouseTool == MOUSE_TOOL_ZOOM }"
+                            @click="SetMouseButtonActions(MOUSE_TOOL_ZOOM, stone.WebViewerAction.ZOOM, stone.WebViewerAction.ZOOM, stone.WebViewerAction.ZOOM)">
                       <i class="fas fa-search"></i>
                     </button>
                   </div>
                   <div class="inline-object">
-                    <button class="wvButton"
+                    <button class="wvButton--underline"
                             data-toggle="tooltip" data-title="Pan"
-                            @click="SetMouseButtonActions(stone.WebViewerAction.PAN, stone.WebViewerAction.PAN, stone.WebViewerAction.PAN)">
+                            v-bind:class="{ 'active' : mouseTool == MOUSE_TOOL_PAN }"
+                            @click="SetMouseButtonActions(MOUSE_TOOL_PAN, stone.WebViewerAction.PAN, stone.WebViewerAction.PAN, stone.WebViewerAction.PAN)">
                       <i class="fas fa-arrows-alt"></i>
                     </button>
                   </div>
                   <div class="inline-object">
-                    <button class="wvButton"
+                    <button class="wvButton--underline"
                             data-toggle="tooltip" data-title="3D cross-hair"
-                            @click="SetMouseButtonActions(stone.WebViewerAction.CROSSHAIR, stone.WebViewerAction.PAN, stone.WebViewerAction.ZOOM)">
+                            v-bind:class="{ 'active' : mouseTool == MOUSE_TOOL_CROSSHAIR }"
+                            @click="SetMouseButtonActions(MOUSE_TOOL_CROSSHAIR, stone.WebViewerAction.CROSSHAIR, stone.WebViewerAction.PAN, stone.WebViewerAction.ZOOM)">
                       <i class="fas fa-crosshairs"></i>
                     </button>
                   </div>
@@ -472,8 +476,8 @@
             
             <div class="ng-scope inline-object">
               <button class="wvButton--underline text-center"
-                      v-bind:class="{ active: (annotationsCurrentAction == stone.WebViewerAction.CREATE_SEGMENT) }"
-                      v-on:click="SetAnnotationsAction(stone.WebViewerAction.CREATE_SEGMENT)"
+                      v-bind:class="{ 'active' : mouseTool == MOUSE_TOOL_CREATE_SEGMENT }"
+                      v-on:click="SetLeftMouseButtonAction(MOUSE_TOOL_CREATE_SEGMENT, stone.WebViewerAction.CREATE_SEGMENT)"
                       data-toggle="tooltip" data-title="Measure length">
                 <i class="fas fa-arrows-alt-h"></i>
               </button>
@@ -481,8 +485,8 @@
 
             <div class="ng-scope inline-object">
               <button class="wvButton--underline text-center"
-                      v-bind:class="{ active: (annotationsCurrentAction == stone.WebViewerAction.CREATE_ANGLE) }" 
-                      v-on:click="SetAnnotationsAction(stone.WebViewerAction.CREATE_ANGLE)"
+                      v-bind:class="{ 'active' : mouseTool == MOUSE_TOOL_CREATE_ANGLE }"
+                      v-on:click="SetLeftMouseButtonAction(MOUSE_TOOL_CREATE_ANGLE, stone.WebViewerAction.CREATE_ANGLE)"
                       data-toggle="tooltip" data-title="Measure angle">
                 <i class="fas fa-angle-left fa-lg"></i>
               </button>
@@ -490,8 +494,8 @@
 
             <div class="ng-scope inline-object">
               <button class="wvButton--underline text-center"
-                      v-bind:class="{ active: (annotationsCurrentAction == stone.WebViewerAction.CREATE_CIRCLE) }" 
-                      v-on:click="SetAnnotationsAction(stone.WebViewerAction.CREATE_CIRCLE)"
+                      v-bind:class="{ 'active' : mouseTool == MOUSE_TOOL_CREATE_CIRCLE }"
+                      v-on:click="SetLeftMouseButtonAction(MOUSE_TOOL_CREATE_CIRCLE, stone.WebViewerAction.CREATE_CIRCLE)"
                       data-toggle="tooltip" data-title="Measure circle">
                 <i class="far fa-circle"></i>
               </button>
@@ -499,8 +503,8 @@
 
             <div class="ng-scope inline-object">
               <button class="wvButton--underline text-center"
-                      v-bind:class="{ active: (annotationsCurrentAction == stone.WebViewerAction.REMOVE_MEASURE) }" 
-                      v-on:click="SetAnnotationsAction(stone.WebViewerAction.REMOVE_MEASURE)"
+                      v-bind:class="{ 'active' : mouseTool == MOUSE_TOOL_REMOVE_MEASURE }"
+                      v-on:click="SetLeftMouseButtonAction(MOUSE_TOOL_REMOVE_MEASURE, stone.WebViewerAction.REMOVE_MEASURE)"
                       data-toggle="tooltip" data-title="Delete measurement">
                 <i class="fas fa-trash"></i>
               </button>