Skip to content

Commit fd1095a

Browse files
authored
Merge pull request #8 from DHTMLX/rename-align
[fix] rename textAlign => align
2 parents 6704b68 + 84c2867 commit fd1095a

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

example/datasets.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ var example = {
204204
"color": "rgba(129,129,129,1)",
205205
"borderLeft": "1px dashed #701243",
206206
"borderRight": "1px dashed #701243",
207-
"textAlign": "center"
207+
"align": "center"
208208
},
209209
{
210210
"color": "rgba(129,129,129,1)",
@@ -213,7 +213,7 @@ var example = {
213213
"fontFamily": "PT Sans",
214214
"verticalAlign": "center",
215215
"format": "General",
216-
"textAlign": "center",
216+
"align": "center",
217217
"borderTop": "1px dotted #000",
218218
"fontWeight": "bold",
219219
"borderRight": "1px dotted #000",
@@ -227,7 +227,7 @@ var example = {
227227
"verticalAlign": "center",
228228
"color": "rgba(129,129,129,1)",
229229
"fontWeight": "bold",
230-
"textAlign": "right",
230+
"align": "right",
231231
"format": "General",
232232
"borderLeft": "1px double #000",
233233
"borderRight": "1px double #000"
@@ -237,7 +237,7 @@ var example = {
237237
"borderBottom": "1px solid #94ff4d",
238238
"background": "rgba(234,234,234,1)",
239239
"verticalAlign": "top",
240-
"textAlign": "center",
240+
"align": "center",
241241
"borderTop": "1px solid #94ff4d",
242242
"borderLeft": "1px solid #94ff4d",
243243
"borderRight": "1px solid #94ff4d",
@@ -246,7 +246,7 @@ var example = {
246246
"fontFamily": "PT Sans"
247247
},
248248
{
249-
"textAlign": "center",
249+
"align": "center",
250250
"borderLeft": "1px solid #000",
251251
"fontWeight": "bold",
252252
"background": "rgba(234,234,234,1)",
@@ -271,15 +271,15 @@ var example = {
271271
"verticalAlign": "top",
272272
"borderLeft": "2px solid #000",
273273
"borderTop": "2px solid #000",
274-
"textAlign": "right"
274+
"align": "right"
275275
},
276276
{
277277
"fontFamily": "PT Sans",
278278
"borderTop": "1px solid #000",
279279
"verticalAlign": "top",
280280
"background": "rgba(152,0,0,1)",
281281
"color": "rgba(0,0,0,1)",
282-
"textAlign": "right",
282+
"align": "right",
283283
"borderBottom": "1px solid #000",
284284
"format": "General",
285285
"borderLeft": "1px solid #000",
@@ -296,11 +296,11 @@ var example = {
296296
"fontFamily": "PT Sans",
297297
"borderTop": "1px solid #000",
298298
"borderRight": "1px solid #000",
299-
"textAlign": "right"
299+
"align": "right"
300300
},
301301
{
302302
"borderTop": "1px solid #000",
303-
"textAlign": "right",
303+
"align": "right",
304304
"format": "General",
305305
"fontFamily": "PT Sans",
306306
"borderBottom": "1px solid #000",
@@ -316,7 +316,7 @@ var example = {
316316
"borderTop": "1px solid #000",
317317
"color": "rgba(0,0,0,1)",
318318
"fontSize": "15px",
319-
"textAlign": "right",
319+
"align": "right",
320320
"borderBottom": "1px solid #000",
321321
"borderRight": "1px solid #000",
322322
"fontFamily": "Impact",
@@ -347,7 +347,7 @@ var example = {
347347
"color": "rgba(255,239,239,1)",
348348
"borderRight": "1px solid #000",
349349
"background": "rgba(110,110,255,1)",
350-
"textAlign": "center",
350+
"align": "center",
351351
"borderLeft": "1px solid #000",
352352
"borderTop": "1px solid #000",
353353
"fontSize": "16px",

src/style.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ fn style_to_props(styles: &HashMap<String, String>) -> StyleProps {
265265
font.strike = value.contains("line-through");
266266
}
267267
"fontSize" => font.size = px_to_pt(&value),
268-
"textAlign" => st.align_h = Some(value.to_owned()),
268+
"align" => st.align_h = Some(value.to_owned()),
269269
"verticalAlign" => st.align_v = Some(value.to_owned()),
270270
"borderTop" => border.top = str_to_border(&value, BorderPosition::Top),
271271
"borderRight" => border.right = str_to_border(&value, BorderPosition::Right),
@@ -471,7 +471,7 @@ fn style_to_props_test() {
471471
styles.insert(String::from("fontSize"), String::from("24px"));
472472
styles.insert(String::from("fontFamily"), String::from("Calibri"));
473473
styles.insert(String::from("textDecoration"), String::from("underline"));
474-
styles.insert(String::from("textAlign"), String::from("left"));
474+
styles.insert(String::from("align"), String::from("left"));
475475
styles.insert(String::from("verticalAlign"), String::from("bottom"));
476476
styles.insert(String::from("borderTop"), String::from("1px solid #9AFF02"));
477477
styles.insert(

0 commit comments

Comments
 (0)