a.editable = true;
var editableTemplateDiv = $('#annotation-editable-template').get(0);
a.infoDiv.innerHTML = this.getTemplateHTML(editableTemplateDiv, a);
+ $(a.infoDiv).toggleClass('editable', !!a.editable);
$(this).triggerHandler('beganEditAnnotation', a);
};
$.each(this.annotations_, function(idx, a) {
// We should never update an editable div -- doing so may kill unsaved
// edits to an annotation.
+ $(a.infoDiv).toggleClass('editable', !!a.editable);
if (a.editable) return;
a.infoDiv.innerHTML = that.getTemplateHTML(templateDiv, a);
});
display: table; /* shrink to fit */
box-shadow: 0 0 4px gray;
cursor: move;
+
+ min-width: 120px; /* prevents squishing at the right edge of the chart */
+ }
+ .annotation-info.editable {
+ min-width: 180px; /* prevents squishing at the right edge of the chart */
}
.dygraph-annotation-line {