Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1270] createStyle

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-10-21T23:46:14.000+0000
Affected Version/sAlloy 1.5.0
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterBert Grantges
AssigneeFeon Sua Xin Miao
Created2015-05-18T03:43:28.000+0000
Updated2015-10-22T04:14:09.000+0000

Description

When using the createStyle function - if you pass in multiple classes with font attributes, the font property is not being extended correctly. Ex. If you have a fontSize and a FontFamily, only one of them will be present.

Attachments

FileDateSize
app.zip2015-10-21T19:41:11.000+00004565

Comments

  1. Jacob Lorenzen 2015-05-20

    Seems like there are some issues with the font object on styles. Looks like the same font object is used cross multiple calls to createStyle. Ex. var style1 = $.createStyle({classes:"classWithFont1"}); var style2 = $.createStyle({classes:"classWithFont2"}); now style1 will have the font from "classWithFont2"
  2. Jacob Lorenzen 2015-05-20

    Also if you use $.lbl.applyProperties({font:{fontSize:18}}); the font of the lbl will be set to default.
  3. Feon Sua Xin Miao 2015-10-21

    Attached test app shows that given multiple classes with font attributes, the font property is extended correctly. Also I'm not able to reproduce the issues on font object being used cross multiple calls to createStyle.

JSON Source