Titanium JIRA Archive
Alloy (ALOY)

[ALOY-771] Allow operators and expressions in TSS

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sAlloy 1.0.0
Fix Version/sn/a
ComponentsStyling
Labelsn/a
ReporterTony Lukasavage
AssigneeUnknown
Created2013-08-02T11:47:16.000+0000
Updated2018-03-07T22:26:11.000+0000

Description

We should support basic arithmetic, bitwise, and comparison operators in the TSS values. This should include the ability to establish precedence via parentheses. The following should be valid:
'Window': {
    windowSoftInputMode: Ti.UI.Android.SOFT_INPUT_STATE_HIDDEN | Ti.UI.Android.SOFT_INPUT_ADJUST_PAN
}

'.someClass': {
    backgroundColor: '#fff',
    height: Ti.Platform.displayCaps.platformHeight / 2,
    width: (Ti.Platform.displayCaps.platformWidth + 50) / 2
}

'.otherClass': {
    visible: Alloy.Globals.someBoolean && Alloy.Globals.anotherBoolean
}

Comments

No comments

JSON Source