File tree 1 file changed +33
-0
lines changed
1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1
1
FPDF . BaseEl = stdClass . extend ( {
2
2
defaultCss :{ } ,
3
3
_name :'BaseEl' ,
4
+
5
+
4
6
constructor :function ( parent ) {
5
7
this . styles = { } ;
6
8
@@ -26,6 +28,12 @@ FPDF.BaseEl = stdClass.extend({
26
28
} ) ;
27
29
return this ;
28
30
} ,
31
+
32
+ /**
33
+ * Set css-style-attributes on the element.
34
+ * @param {object } styles
35
+ * @return {element }
36
+ */
29
37
css :function ( styles ) {
30
38
for ( var n in styles ) {
31
39
this . styles [ n ] = styles [ n ] ;
@@ -125,6 +133,13 @@ FPDF.BaseEl = stdClass.extend({
125
133
this . parent . c . y += this . outerHeight ( ) ;
126
134
}
127
135
} ,
136
+
137
+
138
+ /**
139
+ * Appends an element to this one.
140
+ * @param {FPDF-element } el
141
+ * @return {this }
142
+ */
128
143
append :function ( el ) {
129
144
if ( el ) {
130
145
if ( el . parent ) {
@@ -137,6 +152,12 @@ FPDF.BaseEl = stdClass.extend({
137
152
138
153
return this ;
139
154
} ,
155
+
156
+ /**
157
+ * Prepends an element to this one.
158
+ * @param {FPDF-element } el
159
+ * @return {this }
160
+ */
140
161
prepend :function ( el ) {
141
162
if ( el ) {
142
163
if ( el . parent ) {
@@ -149,10 +170,22 @@ FPDF.BaseEl = stdClass.extend({
149
170
150
171
return this ;
151
172
} ,
173
+
174
+ /**
175
+ * Appends itself to the given element.
176
+ * @param {FPDF-element } el
177
+ * @return {this }
178
+ */
152
179
appendTo :function ( el ) {
153
180
el . append ( this ) ;
154
181
return this ;
155
182
} ,
183
+
184
+ /**
185
+ * Prepends itself to the given element
186
+ * @param {FPDF-element } el
187
+ * @return {this }
188
+ */
156
189
prependTo :function ( el ) {
157
190
el . prepend ( this ) ;
158
191
return this ;
You can’t perform that action at this time.
0 commit comments