Skip to content

Commit 6f91d58

Browse files
revert(getActualRectangle): don't cinclude density for android (#258)
1 parent 0d7d101 commit 6f91d58

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Diff for: lib/ui-element.ts

+9-7
Original file line numberDiff line numberDiff line change
@@ -243,13 +243,15 @@ export class UIElement {
243243
public async getActualRectangle() {
244244
const actRect = await this.getRectangle();
245245
const density = this._args.device.config.density;
246-
if (density) {
247-
actRect.x *= density;
248-
actRect.y *= density;
249-
actRect.width *= density;
250-
actRect.height *= density;
251-
} else {
252-
logError("Device's density is undefined!");
246+
if (this._args.isIOS) {
247+
if (density) {
248+
actRect.x *= density;
249+
actRect.y *= density;
250+
actRect.width *= density;
251+
actRect.height *= density;
252+
} else {
253+
logError("Device's density is undefined!");
254+
}
253255
}
254256
return actRect;
255257
}

0 commit comments

Comments
 (0)