Skip to content

Commit

Permalink
Nodes should each store a ref to the path cache for images to align p…
Browse files Browse the repository at this point in the history
…roperly #2028

Max & Dylan : Debug PathwayCommons/app-ui not showing SBGN bg images (they seem shifted if you turn clipping off)
  • Loading branch information
d2fong committed Dec 14, 2017
1 parent e99503b commit 17b2a8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extensions/renderer/canvas/drawing-nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ CRp.drawNode = function( context, node, shiftToOriginWithBb, drawLabel ){
if( usePaths ){
context.translate( pos.x, pos.y );

let pathCache = r.nodePathCache = r.nodePathCache || [];
let pathCache = rs.nodePathCache = rs.nodePathCache || [];

let key = util.hashStrings(
styleShape === 'polygon' ? styleShape + ',' + shapePts.join(',') : styleShape,
Expand All @@ -109,7 +109,7 @@ CRp.drawNode = function( context, node, shiftToOriginWithBb, drawLabel ){
pathCacheHit = true;
} else {
path = new Path2D();
pathCache[ key ] = path;
pathCache[ key ] = rs.pathCache = path;
}
}

Expand Down

0 comments on commit 17b2a8d

Please sign in to comment.