mirror of
https://github.com/pattern-lab/patternlab-php.git
synced 2025-01-18 06:38:20 +01:00
making sure, if embedding annotations, that only one result per found selector appears
This commit is contained in:
parent
ddcbc4cab5
commit
c6e3033b49
@ -178,8 +178,8 @@ var annotationsPattern = {
|
||||
for (comment in comments.comments) {
|
||||
var item = comments.comments[comment];
|
||||
var els = document.querySelectorAll(item.el);
|
||||
for (var i = 0; i < els.length; ++i) {
|
||||
annotationsPattern.embedComments(els[i],item.title,item.comment);
|
||||
if (els.length > 0) {
|
||||
annotationsPattern.embedComments(els[0],item.title,item.comment);
|
||||
}
|
||||
annotationsPattern.commentsEmbedded = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user