19
19
tooltip = _translate ('Form: a Psychopy survey tool' )
20
20
21
21
# 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
+ }
31
32
knownStyles = form .Form .knownStyles
32
33
34
+
33
35
class FormComponent (BaseVisualComponent ):
34
36
"""A class for presenting a survey as a Builder component"""
35
37
@@ -83,20 +85,6 @@ def __init__(self, exp, parentName,
83
85
hint = _translate ("The csv filename containing the items for your survey." ),
84
86
label = _localized ['Items' ])
85
87
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
-
100
88
self .params ['Text Height' ] = Param (
101
89
textHeight , valType = 'code' , allowedTypes = [],
102
90
updates = 'constant' ,
@@ -140,8 +128,8 @@ def writeInitCode(self, buff):
140
128
" items={Items},\n "
141
129
" textHeight={Text Height},\n "
142
130
" randomize={Randomize},\n "
143
- " size={Size },\n "
144
- " pos={Pos },\n "
131
+ " size={size },\n "
132
+ " pos={pos },\n "
145
133
" style={Style},\n "
146
134
" itemPadding={Item Padding},"
147
135
")\n " .format (** inits ))
@@ -155,8 +143,8 @@ def writeInitCodeJS(self, buff):
155
143
" items : {Items},\n "
156
144
" textHeight : {Text Height},\n "
157
145
" randomize : {Randomize},\n "
158
- " size : {Size },\n "
159
- " pos : {Pos },\n "
146
+ " size : {size },\n "
147
+ " pos : {pos },\n "
160
148
" style : {Style},\n "
161
149
" itemPadding : {Item Padding}\n "
162
150
"}});\n " .format (** inits ))
0 commit comments