diff Applications/StoneWebViewer/WebApplication/app.js @ 1547:bf195fc0797e

fix for Microsoft Edge
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 Aug 2020 15:54:55 +0200
parents d1806b4e4839
children a4d82f1bcb10
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Tue Aug 11 17:09:59 2020 +0200
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Wed Aug 12 15:54:55 2020 +0200
@@ -78,7 +78,9 @@
     },
     SeriesDragDrop: function(event) {
       event.preventDefault();
-      this.$emit('updated-series', event.dataTransfer.getData('seriesIndex'));
+
+      // The "parseInt()" is because of Microsoft Edge Legacy (*)
+      this.$emit('updated-series', parseInt(event.dataTransfer.getData('seriesIndex'), 10));
     },
     MakeActive: function() {
       this.$emit('selected-viewport');
@@ -280,7 +282,8 @@
     },
     
     SeriesDragStart: function(event, seriesIndex) {
-      event.dataTransfer.setData('seriesIndex', seriesIndex);
+      // It is necessary to use ".toString()" for Microsoft Edge Legacy (*)
+      event.dataTransfer.setData('seriesIndex', seriesIndex.toString());
     },
     
     SetViewportSeries: function(viewportIndex, seriesIndex) {