Skip to content

Commit d45ca99

Browse files
committed
BF: Remove duplicate parameters from Form
# Conflicts: # psychopy/experiment/components/form/__init__.py
1 parent 449822e commit d45ca99

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

psychopy/experiment/components/form/__init__.py

+15-27
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,19 @@
1919
tooltip = _translate('Form: a Psychopy survey tool')
2020

2121
# only use _localized values for label values, nothing functional:
22-
_localized = {'Items': _translate('Items'),
23-
'Text Height': _translate('Text Height'),
24-
'Size': _translate('Size'),
25-
'Pos': _translate('Pos'),
26-
'Style': _translate('Styles'),
27-
'Item Padding': _translate('Item Padding'),
28-
'Data Format': _translate('Data Format'),
29-
'Randomize': _translate('Randomize')
30-
}
22+
_localized = {
23+
'Items': _translate('Items'),
24+
'Text Height': _translate('Text Height'),
25+
'Size': _translate('Size'),
26+
'Pos': _translate('Pos'),
27+
'Style': _translate('Styles'),
28+
'Item Padding': _translate('Item Padding'),
29+
'Data Format': _translate('Data Format'),
30+
'Randomize': _translate('Randomize')
31+
}
3132
knownStyles = form.Form.knownStyles
3233

34+
3335
class FormComponent(BaseVisualComponent):
3436
"""A class for presenting a survey as a Builder component"""
3537

@@ -83,20 +85,6 @@ def __init__(self, exp, parentName,
8385
hint=_translate("The csv filename containing the items for your survey."),
8486
label=_localized['Items'])
8587

86-
self.params['Size'] = Param(
87-
size, valType='code', allowedTypes=[],
88-
updates='constant',
89-
hint=_translate(
90-
"Size of the Form on screen in 'height' units. e.g. (1, .7) height units for horizontal,"
91-
"and vertical, respectively"),
92-
label=_localized['Size'])
93-
94-
self.params['Pos'] = Param(
95-
pos, valType='code', allowedTypes=[],
96-
updates='constant',
97-
hint=_translate("x,y position of the form on screen"),
98-
label=_localized['Pos'])
99-
10088
self.params['Text Height'] = Param(
10189
textHeight, valType='code', allowedTypes=[],
10290
updates='constant',
@@ -140,8 +128,8 @@ def writeInitCode(self, buff):
140128
" items={Items},\n"
141129
" textHeight={Text Height},\n"
142130
" randomize={Randomize},\n"
143-
" size={Size},\n"
144-
" pos={Pos},\n"
131+
" size={size},\n"
132+
" pos={pos},\n"
145133
" style={Style},\n"
146134
" itemPadding={Item Padding},"
147135
")\n".format(**inits))
@@ -155,8 +143,8 @@ def writeInitCodeJS(self, buff):
155143
" items : {Items},\n"
156144
" textHeight : {Text Height},\n"
157145
" randomize : {Randomize},\n"
158-
" size : {Size},\n"
159-
" pos : {Pos},\n"
146+
" size : {size},\n"
147+
" pos : {pos},\n"
160148
" style : {Style},\n"
161149
" itemPadding : {Item Padding}\n"
162150
"}});\n".format(**inits))

0 commit comments

Comments
 (0)