From a814966112fc59c39865c791b1e95abcd82d2fd7 Mon Sep 17 00:00:00 2001 From: Max Franz Date: Thu, 28 Apr 2016 16:27:14 -0400 Subject: [PATCH] fix bounding box cache keys causing ele distortions in texture caches #593 #1196 --- src/collection/dimensions.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/collection/dimensions.js b/src/collection/dimensions.js index 0ebd349af0..4b2ae4894a 100644 --- a/src/collection/dimensions.js +++ b/src/collection/dimensions.js @@ -617,22 +617,22 @@ var boundingBoxImpl = function( ele, options ){ return bounds; }; -var appendTfStr = function( str, val ){ +var tf = function( val ){ if( val ){ - str += 't'; + return 't'; } else { - str += 'f'; + return 'f'; } }; var getKey = function( opts ){ var key = ''; - appendTfStr( key, opts.incudeNodes ); - appendTfStr( key, opts.includeEdges ); - appendTfStr( key, opts.includeLabels ); - appendTfStr( key, opts.includeShadows ); - appendTfStr( key, opts.includeOverlays ); + key += tf( opts.incudeNodes ); + key += tf( opts.includeEdges ); + key += tf( opts.includeLabels ); + key += tf( opts.includeShadows ); + key += tf( opts.includeOverlays ); return key; };