mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(core): type collisions with namespace (#8809)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { LayoutBaseCommon, clipToBoundsProperty, isPassThroughParentEnabledProperty } from './layout-base-common';
|
||||
import { Length, paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty } from '../styling/style-properties';
|
||||
import { Length, paddingLeftProperty, paddingTopProperty, paddingRightProperty, paddingBottomProperty, LengthType } from '../styling/style-properties';
|
||||
|
||||
export * from './layout-base-common';
|
||||
|
||||
@@ -26,31 +26,31 @@ export class LayoutBase extends LayoutBaseCommon {
|
||||
(<any>this.nativeViewProtected).setPassThroughParent(value);
|
||||
}
|
||||
|
||||
[paddingTopProperty.getDefault](): Length {
|
||||
[paddingTopProperty.getDefault](): LengthType {
|
||||
return { value: this._defaultPaddingTop, unit: 'px' };
|
||||
}
|
||||
[paddingTopProperty.setNative](value: Length) {
|
||||
[paddingTopProperty.setNative](value: LengthType) {
|
||||
org.nativescript.widgets.ViewHelper.setPaddingTop(this.nativeViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderTopWidth, 0));
|
||||
}
|
||||
|
||||
[paddingRightProperty.getDefault](): Length {
|
||||
[paddingRightProperty.getDefault](): LengthType {
|
||||
return { value: this._defaultPaddingRight, unit: 'px' };
|
||||
}
|
||||
[paddingRightProperty.setNative](value: Length) {
|
||||
[paddingRightProperty.setNative](value: LengthType) {
|
||||
org.nativescript.widgets.ViewHelper.setPaddingRight(this.nativeViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderRightWidth, 0));
|
||||
}
|
||||
|
||||
[paddingBottomProperty.getDefault](): Length {
|
||||
[paddingBottomProperty.getDefault](): LengthType {
|
||||
return { value: this._defaultPaddingBottom, unit: 'px' };
|
||||
}
|
||||
[paddingBottomProperty.setNative](value: Length) {
|
||||
[paddingBottomProperty.setNative](value: LengthType) {
|
||||
org.nativescript.widgets.ViewHelper.setPaddingBottom(this.nativeViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderBottomWidth, 0));
|
||||
}
|
||||
|
||||
[paddingLeftProperty.getDefault](): Length {
|
||||
[paddingLeftProperty.getDefault](): LengthType {
|
||||
return { value: this._defaultPaddingLeft, unit: 'px' };
|
||||
}
|
||||
[paddingLeftProperty.setNative](value: Length) {
|
||||
[paddingLeftProperty.setNative](value: LengthType) {
|
||||
org.nativescript.widgets.ViewHelper.setPaddingLeft(this.nativeViewProtected, Length.toDevicePixels(value, 0) + Length.toDevicePixels(this.style.borderLeftWidth, 0));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user