BaseSignal.js
2 years ago
SignalCheckbox.js
2 years ago
SignalHiddenArray.js
2 years ago
SignalRadio.js
2 years ago
SignalRange.js
2 years ago
SignalRenderState.js
2 years ago
SignalSelect.js
2 years ago
SignalText.js
2 years ago
SignalWysiwyg.js
2 years ago
functions.js
2 years ago
SignalText.js
28 lines
| 1 | import BaseSignal from './BaseSignal'; |
| 2 | |
| 3 | function SignalText() { |
| 4 | BaseSignal.call( this ); |
| 5 | |
| 6 | this.isSupported = function ( node, inputData ) { |
| 7 | return true; |
| 8 | }; |
| 9 | this.runSignal = function () { |
| 10 | this.input.calcValue = Number.isNaN( Number( this.input.calcValue ) ) |
| 11 | ? this.input.calcValue |
| 12 | : parseFloat( this.input.calcValue ); |
| 13 | |
| 14 | const [ node ] = this.input.nodes; |
| 15 | |
| 16 | if ( node.value === this.input.value.current ) { |
| 17 | return; |
| 18 | } |
| 19 | |
| 20 | node.value = this.input.value.current; |
| 21 | |
| 22 | this.triggerJQuery( node ); |
| 23 | }; |
| 24 | } |
| 25 | |
| 26 | SignalText.prototype = Object.create( BaseSignal.prototype ); |
| 27 | |
| 28 | export default SignalText; |