src/widgets/Annotation.js
changeset 1068 7623f9af9272
parent 1033 c20df1c080e6
child 1072 ac1eacb3aa33
--- a/src/widgets/Annotation.js	Fri Sep 25 14:45:38 2015 +0200
+++ b/src/widgets/Annotation.js	Fri Oct 02 11:27:17 2015 +0200
@@ -179,6 +179,9 @@
     this.onMdpEvent("Annotation.maximize","maximize");
     this.onMdpEvent("Annotation.getBounds","sendBounds");
     this.$.find(".Ldt-Annotation-MaxMinButton").click(this.functionWrapper("toggleSize"));
+    this.$.on("resize", function () { _this.width = _this.$.parent().width();
+                                      _this.$.css({ width: _this.width });
+                                    });
     this.getWidgetAnnotations().forEach(function(_a) {
         _a.on("enter", function() {
             drawAnnotation(_a);
@@ -194,7 +197,8 @@
 	    	image: currentAnnotation.thumbnail,
 	    	uri: (typeof currentAnnotation.url !== "undefined" 
 	            ? currentAnnotation.url
-	            : (document.location.href.replace(/#.*$/,'') + '#id='  + currentAnnotation.id))
+	            : (document.location.href.replace(/#.*$/,'') + '#id='  + currentAnnotation.id)),
+            text: '[' + currentAnnotation.begin.toString() + '] ' + currentAnnotation.title
 	    };
     });
 };