@@ -216,6 +216,36 @@ define([
216
216
$ ( that . wrapSelector ( '#color' ) ) . prop ( 'disabled' , $ ( this ) . prop ( 'checked' ) == false ) ;
217
217
} ) ;
218
218
219
+ // axes - ticks location
220
+ $ ( this . wrapSelector ( '#xticks' ) ) . on ( 'change' , function ( ) {
221
+ let val = $ ( this ) . val ( ) ;
222
+ if ( val !== '' ) {
223
+ // enable xticks_label
224
+ $ ( that . wrapSelector ( '#xticks_label' ) ) . prop ( 'readonly' , false ) ;
225
+ } else {
226
+ // disable xticks_label
227
+ $ ( that . wrapSelector ( '#xticks_label' ) ) . prop ( 'readonly' , true ) ;
228
+ }
229
+ } ) ;
230
+ $ ( this . wrapSelector ( '#yticks' ) ) . on ( 'change' , function ( ) {
231
+ let val = $ ( this ) . val ( ) ;
232
+ if ( val !== '' ) {
233
+ // enable yticks_label
234
+ $ ( that . wrapSelector ( '#yticks_label' ) ) . prop ( 'readonly' , false ) ;
235
+ } else {
236
+ // disable yticks_label
237
+ $ ( that . wrapSelector ( '#yticks_label' ) ) . prop ( 'readonly' , true ) ;
238
+ }
239
+ } ) ;
240
+
241
+ // axes - ticks label: inform user to type location option to use label
242
+ $ ( this . wrapSelector ( '#xticks_label[readonly]' ) ) . on ( 'click' , function ( ) {
243
+ $ ( that . wrapSelector ( '#xticks' ) ) . focus ( ) ;
244
+ } ) ;
245
+ $ ( this . wrapSelector ( '#yticks_label[readonly]' ) ) . on ( 'click' , function ( ) {
246
+ $ ( that . wrapSelector ( '#yticks' ) ) . focus ( ) ;
247
+ } ) ;
248
+
219
249
// preview refresh
220
250
$ ( this . wrapSelector ( '#previewRefresh' ) ) . on ( 'click' , function ( ) {
221
251
that . loadPreview ( ) ;
@@ -319,6 +349,14 @@ define([
319
349
} ) ;
320
350
$ ( page ) . find ( '#markerStyle' ) . html ( markerTag . toString ( ) ) ;
321
351
352
+ // x, yticks label check
353
+ if ( this . state . xticks && this . state . xticks !== '' ) {
354
+ $ ( page ) . find ( '#xticks_label' ) . prop ( 'readonly' , false ) ;
355
+ }
356
+ if ( this . state . yticks && this . state . yticks !== '' ) {
357
+ $ ( page ) . find ( '#yticks_label' ) . prop ( 'readonly' , false ) ;
358
+ }
359
+
322
360
// preview sample count
323
361
let sampleCountList = [ 30 , 50 , 100 , 300 , 500 , 700 , 1000 ] ;
324
362
let sampleCountTag = new com_String ( ) ;
0 commit comments