jQuery UIのdroppableはIEやFirefoxでは動作しませんが、Chromeでは動作します。jQuery UIのdroppableはIEとFirefoxでは動作しません(ただしChromeで動作します)
function drawNVDGraph(targetElement, data, type) {
nv.addGraph(function() {
// here I make some graph this works
$("#NVDGraph" + targetElement).draggable();
$("#NVDGraph" + targetElement).draggable("option", "cursor","url(smiley.jpg), cell");
//drag works fine I can see the cursor change
$("#NVDGraph" + targetElement).on("drag", function(event, ui) {
// here I just block the graph so it doesn't move
ui.position.left = 0;
ui.position.right = 0;
ui.position.top = 0;
ui.position.bottom = 0;
//masterSVG = data;
});
$("#NVDGraph" + targetElement).on("drop", function(event, ui) {
// this doesn't work on FF or IE or EDGE the drop isn't even detected
console.log("hello");
var data1 = sinAndCos();
var data2 = sinAndCos2();
var data3 = data1.concat(data2);
drawNVDGraph(targetElement, data3, type);
console.log(data3);
});
コードを少し説明するために、2つのダイアログボックスの両方にグラフがあります。私がやりたいことは、あるグラフから別のグラフにデータをドラッグすることです。 (そのため、私はui.position.left = 0;
を持っています。「私にはデータがあります」と言うためにスマイリーを表示しています。)ChromeのChromeの魅力のように機能します。
devコンソール(F12)にエラーメッセージが表示されますか? – Roberto
問題を再現して表示できますか?例えばcodepenまたはjsfiddleを使用します。 – dewd
devコンソールにエラーはありません。悲しいことに、私はjsfiddleを実行することができませんでした。( 私は再帰関数IEとFFがそうでないかもしれないからだと思います.... 私はそれを投稿する答え –