mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Add support for 'px' on Length in iOS
This commit is contained in:
@@ -45,11 +45,11 @@ export class HtmlView extends HtmlViewBase {
|
||||
}
|
||||
|
||||
let nativeSize = nativeView.sizeThatFits(CGSizeMake(width, height));
|
||||
let labelWidth = nativeSize.width;
|
||||
let labelWidth = layout.toDevicePixels(nativeSize.width);
|
||||
|
||||
labelWidth = Math.min(labelWidth, width);
|
||||
let measureWidth = Math.max(labelWidth, this.effectiveMinWidth);
|
||||
let measureHeight = Math.max(nativeSize.height, this.effectiveMinHeight);
|
||||
let measureHeight = Math.max(layout.toDevicePixels(nativeSize.height), this.effectiveMinHeight);
|
||||
|
||||
let widthAndState = View.resolveSizeAndState(measureWidth, width, widthMode, 0);
|
||||
let heightAndState = View.resolveSizeAndState(measureHeight, height, heightMode, 0);
|
||||
|
||||
Reference in New Issue
Block a user