Commit 067afa76 authored by Jérome Perrin's avatar Jérome Perrin

jsplumb: Internet Explorer only supports "text" as format for evt.dataTransfer.setData

parent 3c8038cf
...@@ -752,7 +752,7 @@ ...@@ -752,7 +752,7 @@
callback = function (evt) { callback = function (evt) {
try { try {
var class_name = JSON.parse( var class_name = JSON.parse(
evt.dataTransfer.getData('application/json') evt.dataTransfer.getData('text')
), ),
offset = $(gadget.props.main).offset(), offset = $(gadget.props.main).offset(),
relative_position = convertToRelativePosition( relative_position = convertToRelativePosition(
......
...@@ -184,8 +184,8 @@ ...@@ -184,8 +184,8 @@
e.dataTransfer = { e.dataTransfer = {
getData: function(type){ getData: function(type){
// make sure we are called properly // make sure we are called properly
equal('application/json', type, equal('text', type,
"The drag&dropped element must have data type application/json"); "The drag&dropped element must have data type text");
return JSON.stringify("Example.Node"); return JSON.stringify("Example.Node");
} }
}; };
...@@ -545,8 +545,8 @@ ...@@ -545,8 +545,8 @@
e.dataTransfer = { e.dataTransfer = {
getData: function(type){ getData: function(type){
// make sure we are called properly // make sure we are called properly
equal('application/json', type, equal('text', type,
"The drag&dropped element must have data type application/json"); "The drag&dropped element must have data type text");
return JSON.stringify("Example.Node"); return JSON.stringify("Example.Node");
} }
}; };
...@@ -647,8 +647,8 @@ ...@@ -647,8 +647,8 @@
e.dataTransfer = { e.dataTransfer = {
getData: function(type){ getData: function(type){
// make sure we are called properly // make sure we are called properly
equal('application/json', type, equal('text', type,
"The drag&dropped element must have data type application/json"); "The drag&dropped element must have data type text");
return JSON.stringify("Example.Node"); return JSON.stringify("Example.Node");
} }
}; };
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
callback = function (evt) { callback = function (evt) {
try { try {
evt.dataTransfer.setData('application/json', evt.dataTransfer.setData('text',
tool.dataset.class_name); tool.dataset.class_name);
} catch (e) { } catch (e) {
reject(e); reject(e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment