diff ape.js @ 1534:f9e50328a26a

Feature #1327: Elements start out grey until the audioObject states it is ready. Requires all interfaceDOM nodes to have member enable().
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Thu, 23 Jul 2015 09:51:26 +0100
parents 766bff1a8f73
children bd128cd894be
line wrap: on
line diff
--- a/ape.js	Thu Jul 23 09:37:27 2015 +0100
+++ b/ape.js	Thu Jul 23 09:51:26 2015 +0100
@@ -434,14 +434,14 @@
 	}
 	
 	
-	testWaitIndicator();
+	//testWaitIndicator();
 }
 
 function sliderObject(audioObject) {
 	// Create a new slider object;
 	this.parent = audioObject;
 	this.trackSliderObj = document.createElement('div');
-	this.trackSliderObj.className = 'track-slider';
+	this.trackSliderObj.className = 'track-slider track-slider-disabled';
 	this.trackSliderObj.id = 'track-slider-'+audioObject.id;
 
 	this.trackSliderObj.setAttribute('trackIndex',audioObject.id);
@@ -478,6 +478,13 @@
 		}
 	};
 	
+	this.enable = function() {
+		if (this.parent.state == 1)
+		{
+			$(this.trackSliderObj).removeClass('track-slider-disabled');
+		}
+	};
+	
 	this.exportXMLDOM = function(audioObject) {
 		// Called by the audioObject holding this element. Must be present
 		var node = document.createElement('value');