-
Notifications
You must be signed in to change notification settings - Fork 6
/
create row features.js
93 lines (62 loc) · 2.15 KB
/
create row features.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
function rowFeat()
{
var that={};
//private members
var hline = false;
var bigstrutTop = false;
var bigstrutBot = false;
//getters
that.get_hline = function(){ return hline; }
that.get_bigstrutTop = function(){ return bigstrutTop; }
that.get_bigstrutBot = function(){ return bigstrutBot; }
// setter
that.set_hline = function(){ hline=true; }
that.set_bigstrutTop = function(){ bigstrutTop = true; }
that.set_bigstrutBot = function(){ bigstrutBot = true; }
// // resetters (not in use)
// that.reset_hline = function(){ hline = false; }
//
// that.reset_bigstrutTop = function(){ bigstrutTop = false; }
//
// that.reset_bigstrutBot = function(){ bigstrutBot = false; }
return that;
}
function RowFeats(l)
{
var that={};
//private members
var hline = [];
var bigstrutTop = [];
var bigstrutBot = [];
var prefix = [];
var sufix = [];
prefix[0]='';
sufix[0] ='';
for(var k = 1 ; k<l ; k++){
prefix[k] = "";
sufix[k] = "\\\\";
}
//getters
that.get_prefix = function(i){return prefix[i];}
that.get_sufix = function(i){return (sufix[i]+'\r\n');}
that.get_hline = function(i){ return hline[i]; }
that.get_bigstrutTop = function(i){ return bigstrutTop[i]; }
that.get_bigstrutBot = function(i){ return bigstrutBot[i]; }
// setter
that.set_prefix = function(x){ prefix[i] = x; }
that.set_sufix = function(x){ sufix[i] = x; }
that.sufix_addToEnd = function(i,x){sufix[i]+=x;}
that.sufix_addToBeg = function(i,x){sufix[i]=(x+sufix[i]);}
that.prefix_addToEnd = function(i,x){prefix[i]+=x;}
that.prefix_addToBeg = function(i,x){prefix[i]=x+prefix[i];}
that.set_hline = function(i){ hline[i]=true; }
that.set_bigstrutTop = function(i){ bigstrutTop[i] = true; }
that.set_bigstrutBot = function(i){ bigstrutBot[i] = true; }
// // resetters (not in use)
// that.reset_hline = function(){ hline = false; }
//
// that.reset_bigstrutTop = function(){ bigstrutTop = false; }
//
// that.reset_bigstrutBot = function(){ bigstrutBot = false; }
return that;
}