Skip to content

Commit e2a44bf

Browse files
committed
can now pull the lineage info into the pop-up view
1 parent c36b58c commit e2a44bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

public/styleguide/js/code-viewer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
var codeViewer = {
1010

11-
codeActive: false,
11+
codeActive: false,
1212
sw: document.documentElement.clientWidth,
1313
breakpoint: 650,
1414

@@ -88,13 +88,13 @@ var codeViewer = {
8888
updateCode: function(lineage,html,css) {
8989

9090
// draw lineage
91-
if (lineage != null) {
91+
if (lineage.length != 0) {
9292
$("#sg-code-lineage").css("display","block");
9393
var i = 0;
9494
var lineageList = "";
9595
for (pattern in lineage) {
9696
lineageList += (i == 0) ? "" : ", ";
97-
lineageList += "<a href='#'>"+lineage[pattern]+"</a>";
97+
lineageList += "<a href='"+lineage[pattern]["lineagePath"]+"'>"+lineage[pattern]["lineagePattern"]+"</a>";
9898
i++;
9999
}
100100
$("#sg-code-lineage-fill").html(lineageList);

0 commit comments

Comments
 (0)