Commit a8d7353c authored by Cody Ede (cme527)'s avatar Cody Ede (cme527)
Browse files

Working Version

parent 654ce1e4
......@@ -16,12 +16,12 @@ ConfidenceRatingTrial.prototype.start = function() {
this.experiment.confidenceDialog.setMessage(this.message);
this.experiment.confidenceDialog.open();
this.handleResponse = function(data) {
var clickPos = data.getLocalPosition(this.experiment.view);
this.handleResponse = function(bttnEvent) {
var clickPos = bttnEvent.data.getLocalPosition(this.experiment.view);
StudyLogger.logEvent({type: 'event.closeinstructions',
message: this.message,
response: data.response,
responseText: data.responseText
response: bttnEvent.response,
responseText: bttnEvent.responseText
});
this.experiment.confidenceDialog.close();
this.completed = true;
......@@ -37,4 +37,4 @@ ConfidenceRatingTrial.prototype.start = function() {
ConfidenceRatingTrial.prototype.update = function(delta) {
};
module.exports = ConfidenceRatingTrial;
\ No newline at end of file
module.exports = ConfidenceRatingTrial;
......@@ -62,8 +62,8 @@ function FastTapMenu(options) {
this.addChild(this.grid);
this.interactive = true;
this.click = function(data) {
var clickPos = data.getLocalPosition(this);
this.click = function(bttnEvent) {
var clickPos = bttnEvent.data.getLocalPosition(this);
var r = Math.floor(clickPos.y / rowHeight);
var c = Math.floor(clickPos.x / colWidth);
var item = this.menuItems[r*this.cols + c];
......@@ -72,8 +72,8 @@ function FastTapMenu(options) {
for (var i = 0; i < this._itemClickHandlers.length; i++) {
this._itemClickHandlers[i]({'menuX': clickPos.x,
'menuY': clickPos.y,
'globalX': data.global.x,
'globalY': data.global.y,
'globalX': bttnEvent.x,
'globalY': bttnEvent.y,
'row': r,
'col': c,
'item': item});
......
......@@ -22,12 +22,12 @@ InstructionsTrial.prototype.start = function() {
this.experiment.modalDialog.setButtonVisible(!this.hidebutton);
this.experiment.modalDialog.setButtonEnabled(this.timeout == 0);
this.handleButtonClick = function(derp) {
var clickPos = derp.data.getLocalPosition(this.experiment.view);
this.handleButtonClick = function(bttnEvent) {
var clickPos = bttnEvent.data.getLocalPosition(this.experiment.view);
StudyLogger.logEvent({type: 'event.closeinstructions',
message: this.message,
clickGlobalX: derp.x,
clickGlobalY: derp.y,
clickGlobalX: bttnEvent.x,
clickGlobalY: bttnEvent.y,
clickExpX: clickPos.x,
clickExpY: clickPos.y});
this.experiment.modalDialog.close();
......
......@@ -127,7 +127,7 @@ function Button(labelText) {
Button.prototype.setLabel = function(labelText) {
this.text = labelText;
this.label.setText(this.text);
this.label.text = this.text;
this.updateLayout();
};
......@@ -148,4 +148,4 @@ Button.prototype.updateLayout = function() {
this.bg.drawRect(0,0,this.width,this.height);
};
module.exports = ModalDialog;
\ No newline at end of file
module.exports = ModalDialog;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment