changeset 414:502f22d1dbc3 Dev_main

Bug #1486: Fixed rogue '+' appearing in move slider alert. Unlabelled axis have default of 'Axis ' and their index.
author Nicholas Jillings <nicholas.jillings@eecs.qmul.ac.uk>
date Thu, 17 Dec 2015 13:03:39 +0000
parents 930354145f6c
children 6e01da7f9f92
files ape.js example_eval/project.xml
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ape.js	Thu Dec 17 11:11:57 2015 +0000
+++ b/ape.js	Thu Dec 17 13:03:39 2015 +0000
@@ -60,10 +60,15 @@
 			}
 			if (interfaceTID.length != 0)
 			{
-				str += 'On axis "'+this.interfaceSliders[i].interfaceObject.title+'" you must move ';
+				var interfaceName = this.interfaceSliders[i].interfaceObject.title;
+				if (interfaceName == undefined) {
+					str += 'On axis '+String(i+1)+' you must move ';
+				} else {
+					str += 'On axis "'+interfaceName+'" you must move ';
+				}
 				if (interfaceTID.length == 1)
 				{
-					str += 'slider +'+interfaceTID[0]+'. ';
+					str += 'slider '+interfaceTID[0]+'. ';
 				}
 				else {
 					str += 'sliders ';
@@ -449,6 +454,8 @@
 	if (interfaceObject.title != undefined && typeof interfaceObject.title == "string")
 	{
 		titleSpan.textContent = interfaceObject.title;
+	} else {
+		titleSpan.textContent = "Axis "+String(this.id+1);
 	}
 	pagetitle.appendChild(titleSpan);
 	this.sliderDOM.appendChild(pagetitle);
--- a/example_eval/project.xml	Thu Dec 17 11:11:57 2015 +0000
+++ b/example_eval/project.xml	Thu Dec 17 13:03:39 2015 +0000
@@ -35,7 +35,6 @@
 	</setup>
 	<audioHolder id='test-0' hostURL="example_eval/" randomiseOrder='true' repeatCount='0' loop='true' elementComments='true' loudness="-12">
 		<interface name="preference">
-			<title>Preference</title>
 			<scale position="0">Min</scale>
 			<scale position="100">Max</scale>
 			<scale position="50">Middle</scale>