Changeset 964 for js/human_3d_alignment/src/widgets/sliderviewer.jsx
- Timestamp:
- 06/27/20 17:57:53 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
js/human_3d_alignment/src/widgets/sliderviewer.jsx
r911 r964 42 42 width: '80%' 43 43 }, 44 textArea: { 45 display: 'table', 46 marginLeft: 'auto', 47 marginRight: 'auto' 48 }, 44 49 nextButton: { 45 50 width: '250px', … … 76 81 this.props = props; 77 82 this.state = { 78 percent: 50 83 percent: 50, 84 textValue: '' 79 85 } 80 86 81 87 this.handleChangePercent = this.handleChangePercent.bind(this); 88 this.handleChangeText = this.handleChangeText.bind(this); 82 89 this.onClickNext = this.onClickNext.bind(this); 83 90 } … … 88 95 */ 89 96 handleChangePercent(per) { 90 97 this.setState({ percent: per.x }, function() { 91 98 console.log(this.state.percent); 92 99 this.props.handleChangePercent(this.state.percent); 100 }); 101 } 102 103 handleChangeText(text_) { 104 this.setState({ textValue: text_.target.value }, function() { 105 this.props.handleChangeText(this.state.textValue); 93 106 }); 94 107 } … … 103 116 console.log(this.state.percent); 104 117 this.props.handleChangePercent(this.state.percent); 118 }); 119 this.setState({ textValue: '' }, function() { 120 console.log(this.state.percent); 121 this.props.handleChangeText(this.state.textValue); 105 122 }); 106 123 } else { … … 146 163 </button> 147 164 </div> 148 <div style={styles.small_interval}/> 165 <div style={styles.interval}/> 166 167 <div className="text"> 168 <textarea value={this.state.textValue} onChange={this.handleChangeText} cols={75} rows={1} style={styles.textArea} placeholder={'Napisz krótko dlaczego dokonałaś/eś akurat takiego dopasowania'}/> 169 </div> 170 {/* 149 171 <div style={styles.finishButton_position}> 150 172 <button type='button' onClick={this.props.onClickFinish} style={styles.finishButton}> … … 152 174 </button> 153 175 </div> 176 */} 154 177 155 178 </div>
Note: See TracChangeset
for help on using the changeset viewer.