11const Array2DTracer = require ( './array2d' ) ;
22
3- function Array1DTracer ( ) {
4- return Array2DTracer . apply ( this , arguments ) ;
5- }
3+ class Array1DTracer extends Array2DTracer {
4+ static getClassName ( ) {
5+ return 'Array1DTracer' ;
6+ }
7+
8+ constructor ( name ) {
9+ super ( name ) ;
10+ }
611
7- Array1DTracer . prototype = $ . extend ( true , Object . create ( Array2DTracer . prototype ) , {
8- constructor : Array1DTracer ,
9- name : "Array1DTracer" ,
10- _notify : function ( idx , v ) {
11- Array2DTracer . prototype . _notify . call ( this , 0 , idx , v ) ;
12+ _notify ( idx , v ) {
13+ super . _notify ( 0 , idx , v ) ;
1214 return this ;
13- } ,
14- _denotify : function ( idx ) {
15- Array2DTracer . prototype . _denotify . call ( this , 0 , idx ) ;
15+ }
16+
17+ _denotify ( idx ) {
18+ super . _denotify ( 0 , idx ) ;
1619 return this ;
17- } ,
18- _select : function ( s , e ) {
20+ }
21+
22+ _select ( s , e ) {
1923 if ( e === undefined ) {
20- Array2DTracer . prototype . _select . call ( this , 0 , s ) ;
24+ super . _select ( 0 , s ) ;
2125 } else {
22- Array2DTracer . prototype . _selectRow . call ( this , 0 , s , e ) ;
26+ super . _selectRow ( 0 , s , e ) ;
2327 }
2428 return this ;
25- } ,
26- _deselect : function ( s , e ) {
29+ }
30+
31+ _deselect ( s , e ) {
2732 if ( e === undefined ) {
28- Array2DTracer . prototype . _deselect . call ( this , 0 , s ) ;
33+ super . _deselect ( 0 , s ) ;
2934 } else {
30- Array2DTracer . prototype . _deselectRow . call ( this , 0 , s , e ) ;
35+ super . _deselectRow ( 0 , s , e ) ;
3136 }
3237 return this ;
33- } ,
34- setData : function ( D ) {
35- return Array2DTracer . prototype . setData . call ( this , [ D ] ) ;
3638 }
37- } ) ;
39+
40+ setData ( D ) {
41+ return super . setData ( [ D ] ) ;
42+ }
43+ }
3844
3945module . exports = Array1DTracer ;
0 commit comments