Skip to content

Commit

Permalink
Merge pull request #2244 from dvbridges/sliderFix
Browse files Browse the repository at this point in the history
BF: Reactivate forceEndRoutine for Slider.
  • Loading branch information
peircej committed Jan 30, 2019
2 parents fce0245 + a0ca2e3 commit f519b69
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions psychopy/experiment/components/slider/__init__.py
Expand Up @@ -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']
Expand Down

0 comments on commit f519b69

Please sign in to comment.