@@ -302,7 +302,7 @@ FramePattern.prototype.getRendererType = function(frame){
302
302
}
303
303
304
304
function FrameRule ( ) {
305
- this . rule = { pattern : { } } ;
305
+ this . rule = { pattern : { } } ;
306
306
return this ;
307
307
}
308
308
@@ -311,26 +311,6 @@ FrameRule.prototype.scope = function(scope){
311
311
return this ;
312
312
}
313
313
314
- FrameRule . prototype . renderer = function ( rend ) {
315
- this . rule . renderer = rend ;
316
- return this ;
317
- }
318
-
319
- FrameRule . prototype . render = function ( func ) {
320
- this . rule . render = func ;
321
- return this ;
322
- }
323
-
324
- FrameRule . prototype . args = function ( json ) {
325
- this . rule . args = json ;
326
- return this ;
327
- }
328
-
329
- FrameRule . prototype . compare = function ( func ) {
330
- this . rule . compare = func ;
331
- return this ;
332
- }
333
-
334
314
FrameRule . prototype . frame_type = function ( ...frametype ) {
335
315
this . rule . pattern . frametype = frame_type ;
336
316
return this ;
@@ -404,5 +384,103 @@ FrameRule.prototype.status = function(...status){
404
384
return this ;
405
385
}
406
386
387
+ FrameRule . prototype . renderer = function ( rend ) {
388
+ if ( ! rend ) return this . rule . renderer ;
389
+ this . rule . renderer = rend ;
390
+ return this ;
391
+ }
392
+
393
+ FrameRule . prototype . render = function ( func ) {
394
+ if ( func ) {
395
+ this . rule . render = func ;
396
+ return this ;
397
+ }
398
+ return func ;
399
+ }
400
+
401
+ FrameRule . prototype . args = function ( json ) {
402
+ if ( ! json ) return this . rule . args ;
403
+ this . rule . args = json ;
404
+ return this ;
405
+ }
406
+
407
+ FrameRule . prototype . compare = function ( func ) {
408
+ if ( ! func ) return this . rule . compare ;
409
+ this . rule . compare = func ;
410
+ return this ;
411
+ }
412
+
413
+ FrameRule . prototype . mode = function ( m ) {
414
+ if ( ! m ) return this . rule . mode ;
415
+ this . rule . mode = m ;
416
+ return this ;
417
+ }
418
+
419
+ FrameRule . prototype . collapse = function ( m ) {
420
+ if ( ! m ) return this . rule . collapse ;
421
+ this . rule . collapse = m ;
422
+ return this ;
423
+ }
424
+
425
+
426
+ FrameRule . prototype . hidden = function ( m ) {
427
+ if ( ! m ) return this . rule . hidden ;
428
+ this . rule . hidden = m ;
429
+ return this ;
430
+ }
431
+
432
+ FrameRule . prototype . view = function ( m ) {
433
+ if ( ! m ) return this . rule . view ;
434
+ this . rule . view = m ;
435
+ return this ;
436
+ }
437
+
438
+ FrameRule . prototype . show_disabled_buttons = function ( m ) {
439
+ if ( ! m ) return this . rule . show_disabled_buttons ;
440
+ this . rule . hide_disabled_buttons = m ;
441
+ return this ;
442
+ }
443
+
444
+ FrameRule . prototype . features = function ( m ) {
445
+ if ( ! m ) return this . rule . features ;
446
+ this . rule . features = m ;
447
+ return this ;
448
+ }
449
+
450
+ FrameRule . prototype . header_features = function ( m ) {
451
+ if ( ! m ) return this . rule . header_features ;
452
+ this . rule . header_features = m ;
453
+ return this ;
454
+ }
455
+
456
+ FrameRule . prototype . header = function ( m ) {
457
+ if ( ! m ) return this . rule . header ;
458
+ this . rule . header = m ;
459
+ return this ;
460
+ }
461
+
462
+ FrameRule . prototype . feature_renderers = function ( m ) {
463
+ if ( ! m ) return this . rule . feature_renderers ;
464
+ this . rule . feature_renderers = m ;
465
+ return this ;
466
+ }
467
+
468
+ FrameRule . prototype . show_empty = function ( m ) {
469
+ if ( ! m ) return this . rule . show_empty ;
470
+ this . rule . show_empty = m ;
471
+ return this ;
472
+ }
473
+
474
+ FrameRule . prototype . dataviewer = function ( m ) {
475
+ if ( ! m ) return this . rule . dataviewer ;
476
+ this . rule . dataviewer = m ;
477
+ return this ;
478
+ }
479
+
480
+ FrameRule . prototype . dataviewer_options = function ( m ) {
481
+ if ( ! m ) return this . rule . dataviewer_options ;
482
+ this . rule . dataviewer_options = m ;
483
+ return this ;
484
+ }
407
485
408
486
module . exports = { FramePatternMatcher, FramePattern, FrameRule } ;
0 commit comments