[ALOY-1643] Alloy: Conditional styling broken in tss
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Styling |
Labels | engTriage |
Reporter | Hans Knöchel |
Assignee | Bruce Wayne |
Created | 2019-01-16T10:21:13.000+0000 |
Updated | 2019-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.
No comments