# HG changeset patch # User Sebastien Jodogne # Date 1597938275 -7200 # Node ID cf652990abb141263fa78b23f720ca5fe8c0a0c9 # Parent b4ccd4963d37276eb95b0cf7bc042a920408c05f tunable mouse actions diff -r b4ccd4963d37 -r cf652990abb1 Applications/StoneWebViewer/WebApplication/app.js --- a/Applications/StoneWebViewer/WebApplication/app.js Thu Aug 20 13:57:52 2020 +0200 +++ b/Applications/StoneWebViewer/WebApplication/app.js Thu Aug 20 17:44:35 2020 +0200 @@ -104,6 +104,7 @@ leftMode: 'grid', // Can be 'small', 'grid' or 'full' leftVisible: true, viewportLayoutButtonsVisible: false, + mouseActionsVisible: false, activeViewport: 0, showInfo: true, showReferenceLines: true, @@ -193,7 +194,7 @@ } }, methods: { - FitContent() { + FitContent: function() { // This function can be used even if WebAssembly is not initialized yet if (typeof stone._AllViewportsUpdateSize !== 'undefined') { this.$nextTick(function () { @@ -202,7 +203,7 @@ } }, - GetActiveSeries() { + GetActiveSeries: function() { var s = []; if ('tags' in this.viewport1Series) @@ -220,7 +221,7 @@ return s; }, - GetActiveCanvas() { + GetActiveCanvas: function() { if (this.activeViewport == 1) { return 'canvas1'; } @@ -445,48 +446,57 @@ } }, - SetWindowing(center, width) { + SetWindowing: function(center, width) { var canvas = this.GetActiveCanvas(); if (canvas != '') { stone.SetWindowing(canvas, center, width); } }, - SetDefaultWindowing() { + SetDefaultWindowing: function() { var canvas = this.GetActiveCanvas(); if (canvas != '') { stone.SetDefaultWindowing(canvas); } }, - InvertContrast() { + InvertContrast: function() { var canvas = this.GetActiveCanvas(); if (canvas != '') { stone.InvertContrast(canvas); } }, - FlipX() { + FlipX: function() { var canvas = this.GetActiveCanvas(); if (canvas != '') { stone.FlipX(canvas); } }, - FlipY() { + FlipY: function() { var canvas = this.GetActiveCanvas(); if (canvas != '') { stone.FlipY(canvas); } }, - ApplyPreferences() { + ApplyPreferences: function() { this.modalPreferences = false; if ((stone.IsSoftwareRendering() != 0) != this.settingSoftwareRendering) { document.location.reload(); } - } + }, + + HideAllTooltips: function() { + $('[data-toggle="tooltip"]').tooltip('hide'); + }, + + SetMouseButtonActions: function(left, middle, right) { + this.mouseActionsVisible = false; + stone.SetMouseButtonActions(left, middle, right); + } }, mounted: function() { @@ -609,7 +619,11 @@ $(document).ready(function() { // Enable support for tooltips in Bootstrap - //$('[data-toggle="tooltip"]').tooltip(); + $('[data-toggle="tooltip"]').tooltip({ + placement: 'bottom', + container: 'body', + trigger: 'hover' + }); //app.modalWarning = true; diff -r b4ccd4963d37 -r cf652990abb1 Applications/StoneWebViewer/WebApplication/index.html --- a/Applications/StoneWebViewer/WebApplication/index.html Thu Aug 20 13:57:52 2020 +0200 +++ b/Applications/StoneWebViewer/WebApplication/index.html Thu Aug 20 17:44:35 2020 +0200 @@ -255,7 +255,8 @@
@@ -285,6 +286,46 @@ + +
+
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ + +