diff -r 37a4566bb7ee -r c472984db275 src/widgets/Polemic.js --- a/src/widgets/Polemic.js Wed Apr 03 15:40:58 2013 +0200 +++ b/src/widgets/Polemic.js Wed Apr 03 15:44:17 2013 +0200 @@ -113,7 +113,7 @@ function displayAnnotation(_elx, _ely, _pol, _col, _annotation) { var _html = Mustache.to_html( - '
', { id: _annotation.id, @@ -134,17 +134,15 @@ _annotation.trigger("unselect"); }).click(function() { _annotation.trigger("click"); - }).on("dragstart", function(e) { - var url = (typeof _annotation.url !== "undefined" - ? _annotation.url - : (document.location.href.replace(/#.*$/,'') + '#id=' + _annotation.id)); - e.originalEvent.dataTransfer.setData("text/x-iri-title",_annotation.title); - e.originalEvent.dataTransfer.setData("text/x-iri-description",_annotation.description); - e.originalEvent.dataTransfer.setData("text/x-iri-uri",url); - if (typeof _annotation.thumbnail !== "undefined" && _annotation.thumbnail) { - e.originalEvent.dataTransfer.setData("text/x-iri-image",_annotation.thumbnail); - } - }); + }); + IriSP.attachDndData(_el, { + title: _annotation.title, + description: _annotation.description, + image: _annotation.thumbnail, + uri: (typeof _annotation.url !== "undefined" + ? _annotation.url + : (document.location.href.replace(/#.*$/,'') + '#id=' + _annotation.id)) + }); _annotation.on("select", function() { if (_this.tooltip) { _this.tooltip.show(