@@ -216,6 +216,36 @@ define([
216216 $ ( that . wrapSelector ( '#color' ) ) . prop ( 'disabled' , $ ( this ) . prop ( 'checked' ) == false ) ;
217217 } ) ;
218218
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+
219249 // preview refresh
220250 $ ( this . wrapSelector ( '#previewRefresh' ) ) . on ( 'click' , function ( ) {
221251 that . loadPreview ( ) ;
@@ -319,6 +349,14 @@ define([
319349 } ) ;
320350 $ ( page ) . find ( '#markerStyle' ) . html ( markerTag . toString ( ) ) ;
321351
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+
322360 // preview sample count
323361 let sampleCountList = [ 30 , 50 , 100 , 300 , 500 , 700 , 1000 ] ;
324362 let sampleCountTag = new com_String ( ) ;
0 commit comments