diff -r 566b590aaf8f -r a7efd386872a src/widgets/Segments.js --- a/src/widgets/Segments.js Fri Feb 08 16:38:28 2013 +0100 +++ b/src/widgets/Segments.js Wed Feb 27 18:39:53 2013 +0100 @@ -22,7 +22,7 @@ + '
'; IriSP.Widgets.Segments.prototype.annotationTemplate = - '
' @@ -98,6 +98,14 @@ .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); + }) .appendTo(list_$) _annotation.on("select", function() { _this.$segments.each(function() {