[ALOY-721] Alloy.resetClass() & $.resetClass()
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-06-25T22:10:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.2.0, 2013 Sprint 13 |
Components | Runtime, Styling |
Labels | qe-testadded |
Reporter | Tony Lukasavage |
Assignee | Tony Lukasavage |
Created | 2013-06-25T18:18:48.000+0000 |
Updated | 2013-07-22T23:05:36.000+0000 |
Description
We have addClass() and removeClass(), but it would nice to be able to completely reset the "classes" of a Titanium proxy object to a specific state. For this we should add resetClass(proxy, classes, opts) which would make the "classes" of the target proxy equal to the given classes argument.
PR: https://github.com/appcelerator/alloy/pull/164 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-721 Functional review can be verified by running the app and clicking the main (center) label multiple times. Each time you click the label it should reset to a new set of classes (indicated at the bottom of the app). Confirm on all platforms that the label reflects the current set of classes to verify. NOTE: Android does not support shadow, so shadow styles will not appear.
Verified as working as expected. Environment: Titanium SDK 3.1.2.v20130718094558 Appcelerator Studio 3.1.2.201307191853 Alloy 1.2.0 LiveView 0.1.28 (from Beta stream) Android device 4.2.2 - iPhone 5 6.1.4 Closing.