repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 831d9268e2afaea7cd266a12697a142aebfb7761:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 831d9268e2afaea7cd266a12697a142aebfb7761
Author: James Baicoianu 
Date:   Wed Apr 1 11:06:43 2020 -0700

    Keep track of when color is changed from default

diff --git a/scripts/janusbase.js b/scripts/janusbase.js
index 4f2ed28255aa842c155ad9fc9ccc19047a6a9c8c..
index ..3091dbb50d0335fe7a84eefab266c589a750e8fd 100644
--- a/scripts/janusbase.js
+++ b/scripts/janusbase.js
@@ -1,6 +1,7 @@
 elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], function() {
   elation.component.add('engine.things.janusbase', function() {
     this.defaultcolor = new THREE.Color(0xffffff);
+    this.colorIsDefault = true;

     this.postinit = function() {
       elation.engine.things.janusbase.extendclass.postinit.call(this);
@@ -66,7 +67,6 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f

       this.eventlistenerproxies = {};
       //if (this.col) this.color = this.col;
-      this.colorIsDefault = true;

       // FIXME - saving references to bound functions, for future use.  This should happen deeper in the component framework
       this.handleFrameUpdates = elation.bind(this, this.handleFrameUpdates);
@@ -100,6 +100,9 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f
           this.colorIsDefault = false;
           delete this._proxies['color'];
         }
+      } else {
+        this.colorIsDefault = false;
+        delete this._proxies['color'];
       }
     }
     this.updateOpacity = function() {

-----END OF PAGE-----