1# Window Subsystem Changelog 2 3## cl.display.1 Changed the rotation and orientation Attributes of Display Objects 4 5**Access Level** 6 7Public API 8 9**Reason for Change** 10 11The orientation of electronic components on different devices such as smartphones and tablets varies. This variation causes a discrepancy between the natural direction of sensors and the physical orientation of the screen. As a result, the rotation and orientation changes in the Display object on tablets do not align with those on smartphones. This inconsistency can be confusing for users and necessitates special handling based on the device type, which can impact usability. 12 13**Change Impact** 14 15This change is a non-compatible change. 16 17After the change, the display orientation on tablets will be changed to be the same as that on mobile phones. 18 19The following show the comparison before and after the change. 20 21| Device Rotation Direction| Tablet Before Change| Tablet After Change| Mobile Phone| 22|---------|---------|---------|---------| 23|  | rotation: 1 <br> orientation: 0 | rotation: 0 <br> orientation: 0 | rotation: 0 <br> orientation: 0 | 24|  | rotation: 2 <br> orientation: 3 | rotation: 1 <br> orientation: 1 |rotation: 1 <br> orientation: 1 | 25|  | rotation: 3 <br> orientation: 2| rotation: 2 <br> orientation: 2 | rotation: 2 <br> orientation: 2 | 26|  | rotation: 0 <br> orientation: 1 | rotation: 3 <br> orientation: 3 | rotation: 3 <br> orientation: 3 | 27 28**Start API Level** 29 307 31 32**Change Since** 33 34OpenHarmony SDK 5.0.2.1 35 36**Key API/Component Changes** 37 38**rotation** and **orientation** attributes of the Display object in the @ohos.display.d.ts file 39 40**Adaptation Guide** 41 42Listen for landscape/portrait mode changes on tablets. 43 44Call **display.on('change')** to listen for display attribute changes and obtain the **rotation** and **orientation** values from the Display object. Determine the landscape or portrait state based on these values for tablets, and pay attention to any changes to these values. 45 46With the charging port facing downward (rotation set at **0**) as the reference point, and rotating the tablet clockwise by 0, 90, 180, and 270 degrees, the correlation between **rotation** and **orientation** values on tablets is detailed in the table below. 47 48|Clockwise Rotation Angle|Value of rotation Before Change | Value of rotation After Change | Value of orientation Before Change | Value of orientation After Change| 49|------- |------- | -------- | --------------- |--------------- | 50|0 |1 | 0 | 0 |0 | 51|90 |2 | 1 | 3 |1 | 52|180 |3 | 2 | 2 |2 | 53|270 |0 | 3 | 1 |3 | 54