← All changes
|
classes/Visualizer/Gutenberg/src/Components/Sidebar/SeriesSettings.js
+5
-17
3.10.11
→
3.4.7
View file →
| @@ -59,13 +59,10 @@ | ||
| 59 | 59 | > |
| 60 | 60 | |
| 61 | 61 | { Object.keys( settings.series ) |
| 62 | 62 | .map( ( i, index ) => { |
| 63 | - i = parseInt( i ) + 1; | |
| 64 | 63 | let indexToFormat = parseInt( i ); |
| 65 | - let label = 'object' === typeof series[i] ? series[i].label : ''; | |
| 66 | - let type = 'object' == typeof series[i] ? series[i].type : ''; | |
| 67 | - let timer = 0; | |
| 64 | + | |
| 68 | 65 | if ( 'tabular' !== type ) { |
| 69 | 66 | indexToFormat = index; |
| 70 | 67 | } |
| 71 | 68 | |
| @@ -72,9 +69,9 @@ | ||
| 72 | 69 | i++; |
| 73 | 70 | |
| 74 | 71 | return ( |
| 75 | 72 | <PanelBody |
| 76 | - title={ label } | |
| 73 | + title={ series[i].label } | |
| 77 | 74 | className="visualizer-inner-sections" |
| 78 | 75 | initialOpen={ false } |
| 79 | 76 | > |
| 80 | 77 | |
| @@ -105,17 +102,8 @@ | ||
| 105 | 102 | onChange={ e => { |
| 106 | 103 | settings.series[index].lineWidth = e; |
| 107 | 104 | this.props.edit( settings ); |
| 108 | 105 | } } |
| 109 | - onKeyUp={ e => { | |
| 110 | - clearTimeout( timer ); | |
| 111 | - timer = setTimeout( () => { | |
| 112 | - if ( '' != settings.series[index].lineWidth && 0 >= settings.series[index].lineWidth ) { | |
| 113 | - settings.series[index].lineWidth = '0.1'; | |
| 114 | - this.props.edit( settings ); | |
| 115 | - } | |
| 116 | - }, 700 ); | |
| 117 | - } } | |
| 118 | 106 | /> |
| 119 | 107 | |
| 120 | 108 | <TextControl |
| 121 | 109 | label={ __( 'Point Size' ) } |
| @@ -132,9 +120,9 @@ | ||
| 132 | 120 | ) } |
| 133 | 121 | |
| 134 | 122 | { ( -1 >= [ 'candlestick' ].indexOf( type ) ) && |
| 135 | 123 | |
| 136 | - ( type && 'number' === type ) ? ( | |
| 124 | + ( 'number' === series[i].type ) ? ( | |
| 137 | 125 | |
| 138 | 126 | <Fragment> |
| 139 | 127 | |
| 140 | 128 | <TextControl |
| @@ -158,9 +146,9 @@ | ||
| 158 | 146 | </Fragment> |
| 159 | 147 | |
| 160 | 148 | ) : |
| 161 | 149 | |
| 162 | - ( 0 <= [ 'date', 'datetime', 'timeofday' ].indexOf( type ) ) && ( | |
| 150 | + ( 0 <= [ 'date', 'datetime', 'timeofday' ].indexOf( series[i].type ) ) && ( | |
| 163 | 151 | |
| 164 | 152 | <Fragment> |
| 165 | 153 | |
| 166 | 154 | <TextControl |
| @@ -175,9 +163,9 @@ | ||
| 175 | 163 | /> |
| 176 | 164 | |
| 177 | 165 | <p> |
| 178 | 166 | { __( 'This is a subset of the date formatting ' ) } |
| 179 | - <ExternalLink href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax"> | |
| 167 | + <ExternalLink href="http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax"> | |
| 180 | 168 | { __( 'ICU date and time format.' ) } |
| 181 | 169 | </ExternalLink> |
| 182 | 170 | </p> |
| 183 | 171 | |