Browse Source

Merge pull request #268 from ImmobilienScout24/feature/linebreak_in_annotations_tooltip

replace linebreaks with <br/> in data section of tooltip.
Torkel Ödegaard 11 năm trước cách đây
mục cha
commit
7248358ac1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/app/services/annotationsSrv.js

+ 1 - 1
src/app/services/annotationsSrv.js

@@ -135,7 +135,7 @@ define([
       }
       tooltip += '<i>' + moment(options.time).format('YYYY-MM-DD HH:mm:ss') + '</i><br/>';
       if (options.data) {
-        tooltip += options.data;
+        tooltip += options.data.replace(/\n/g, '<br/>');
       }
       tooltip += "</small>";