Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1643] Alloy: Conditional styling broken in tss

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsStyling
LabelsengTriage
ReporterHans Knöchel
AssigneeBruce Wayne
Created2019-01-16T10:21:13.000+0000
Updated2019-03-14T20:12:38.000+0000

Description

When using conditional styling in Alloy, it seems to work in the following case: **alloy.js**
Alloy.Globals.isLargeDisplay =Ti.Platform.displayCaps.platformHeight) > 568;
Alloy.Globals.isLargeiOSDisplay = Ti.Platform.osname !== 'android' && Alloy.Globals.isLargeDisplay;
**app.tss**
'.largeTitles[if=Alloy.Globals.isLargeiOSDisplay]': {
  largeTitleEnabled: true,
  largeTitleDisplayMode: Ti.UI.iOS.LARGE_TITLE_DISPLAY_MODE_ALWAYS
}
Error:
[ERROR] V8Exception: Exception occurred at /alloy/styles/myview/detail/index.js:1: Uncaught TypeError: Cannot read property 'LARGE_TITLE_DISPLAY_MODE_ALWAYS' of undefined
We just workarounded it by using the raw value of the enum (1 for LARGE_TITLE_DISPLAY_MODE_ALWAYS). Not really ideal, but unblocking.

Comments

No comments

JSON Source