From 729ee128bde50227430f0d6d5d148050ab4c1557 Mon Sep 17 00:00:00 2001 From: Andrew Schwartz Date: Sun, 21 Jun 2015 21:58:57 -0400 Subject: [PATCH] Only set backgroundColor if specified in setOptions --- lib/graph3d/Graph3d.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/graph3d/Graph3d.js b/lib/graph3d/Graph3d.js index ef9547b9..27ccc961 100644 --- a/lib/graph3d/Graph3d.js +++ b/lib/graph3d/Graph3d.js @@ -876,6 +876,7 @@ Graph3d.prototype.setOptions = function (options) { if (options.zMax !== undefined) this.defaultZMax = options.zMax; if (options.valueMin !== undefined) this.defaultValueMin = options.valueMin; if (options.valueMax !== undefined) this.defaultValueMax = options.valueMax; + if (options.backgroundColor !== undefined) this._setBackgroundColor(options.backgroundColor); if (options.cameraPosition !== undefined) cameraPosition = options.cameraPosition; @@ -904,7 +905,7 @@ Graph3d.prototype.setOptions = function (options) { } } } - this._setBackgroundColor(options.backgroundColor); + } this.setSize(this.width, this.height);