|
1 | 1 | # Releases
|
2 | 2 |
|
| 3 | + |
| 4 | +### 4.0.0 (2019, March 14) |
| 5 | + |
| 6 | +#### Breaking changes: |
| 7 | + - [Add enumerations for string properties](https://github.com/NativeScript/nsplugins-internal/issues/169) |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +## What is the current behavior? |
| 12 | +1. Enum-looking properties are difficult to use, because their type is string and they are hard to guess. Example: |
| 13 | +``` |
| 14 | +scaleStyle.ticksLayoutMode = "Outer"; |
| 15 | +``` |
| 16 | +2. Color related properties are not using the Color type, instead they are of type string. Example: |
| 17 | +``` |
| 18 | +scaleStyle.lineColor = "SlateGray"; |
| 19 | +``` |
| 20 | + |
| 21 | +## What is the new behavior? |
| 22 | +1. The enum-looking properties have their enums, so they are easier to use. Example: |
| 23 | +``` |
| 24 | +scaleStyle.ticksLayoutMode = GaugeScaleLayoutMode.Outer; |
| 25 | +``` |
| 26 | +2. The Color related properties are using the type especially created for handling colors - Color: |
| 27 | +``` |
| 28 | +scaleStyle.lineColor = new Color("SlateGray"); |
| 29 | +``` |
| 30 | + |
| 31 | +Related to [this issue](https://github.com/NativeScript/nsplugins-internal/issues/169). |
| 32 | + |
| 33 | +<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> |
| 34 | + |
| 35 | +## 🔴 BREAKING CHANGES 🔴 |
| 36 | + |
| 37 | +1. The following enumerations are created: `GaugeScaleLayoutMode`, `GaugeIndicatorCapMode`. They are used where appropriate. |
| 38 | +2. Every property that contains "color" in its name (for example: `majorTicksStrokeColor`, `lineColor`, etc.) is now of type `Color` (was `string`). |
| 39 | + |
| 40 | +Migration steps: |
| 41 | +- replace every "magic string" usage with a value from the relevant enum |
| 42 | +- replace every "Color string" usage with values of type `Color` |
| 43 | + |
| 44 | + |
3 | 45 | ### 3.8.0 (2018, December 20)
|
4 | 46 |
|
5 | 47 | #### Features:
|
|
0 commit comments