Skip to content

Commit

Permalink
Fix jacomyal#86 sigma.renderers.glyphs: glyphs displayed on hidden nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
sheymann committed Mar 23, 2015
1 parent f4210f0 commit b8207c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/sigma.renderers.glyphs/sigma.renderers.glyphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,15 @@
}
};

var display;
nodes.forEach(function(node) {
if (node.glyphs) {
node.glyphs.forEach(function(glyph) {
display = !node.hidden;
if (display) {
display = ('draw' in glyph) ? glyph.draw : defDraw;
}

draw(
{
x: node[prefix + 'x'],
Expand All @@ -143,7 +149,7 @@
fontScale: glyph.fontScale || defFontScale,
threshold: glyph.threshold || defThreshold,
textThreshold: glyph.textThreshold || defTextThreshold,
draw: ('draw' in glyph) ? glyph.draw : ((defDraw) ? !node.hidden : false)
draw: display
},
self.drawingContext
);
Expand Down

0 comments on commit b8207c9

Please sign in to comment.