Permalink
Browse files

BF: Reactivate forceEndRoutine for Slider.

  • Loading branch information...
dvbridges committed Jan 30, 2019
1 parent 4d7dc49 commit a0ca2e31237986bad9230f8d17981aad61b1600e
Showing with 6 additions and 6 deletions.
  1. +6 −6 psychopy/experiment/components/slider/__init__.py
@@ -260,12 +260,12 @@ def writeFrameCode(self, buff):

def writeFrameCodeJS(self, buff):
super(SliderComponent, self).writeFrameCodeJS(buff) # Write basevisual frame code
# forceEnd = self.params['forceEndRoutine'].val
# if forceEnd:
# code = ("\n// Check %(name)s for response to end routine\n"
# "if (%(name)s.getRating() !== 'undefined' && %(name)s.status === PsychoJS.Status.STARTED) {\n"
# " continueRoutine = false; }\n")
# buff.writeIndentedLines(code % (self.params))
forceEnd = self.params['forceEndRoutine'].val
if forceEnd:
code = ("\n// Check %(name)s for response to end routine\n"
"if (%(name)s.getRating() !== 'undefined' && %(name)s.status === PsychoJS.Status.STARTED) {\n"
" continueRoutine = false; }\n")
buff.writeIndentedLines(code % (self.params))

def writeRoutineEndCode(self, buff):
name = self.params['name']

0 comments on commit a0ca2e3

Please sign in to comment.