Skip to content

Commit

Permalink
fix: maxLines fix for latest N
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jul 22, 2022
1 parent c87a665 commit 36763fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
19 changes: 9 additions & 10 deletions src/label.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,17 @@ import {
} from '@nativescript/core/ui/styling/style-properties';
import {
letterSpacingProperty,
lineHeightProperty,
textAlignmentProperty,
textDecorationProperty,
textTransformProperty,
whiteSpaceProperty
} from '@nativescript/core/ui/text-base';
import { lineHeightProperty } from '@nativescript/core/ui/text-base/text-base-common';
import { layout } from '@nativescript/core/utils/utils';
import { Label as LabelViewDefinition, LineBreak, TextShadow } from './label';
import {
autoFontSizeProperty,
lineBreakProperty,
maxLinesProperty,
selectableProperty,
textShadowProperty
} from './label-common';
import { maxLinesProperty } from '@nativescript/core/ui/text-base/text-base-common';
import lazy from '@nativescript/core/utils/lazy';
import { layout } from '@nativescript/core/utils/utils';
import { Label as LabelViewDefinition, LineBreak } from './label';
import { autoFontSizeProperty, lineBreakProperty, selectableProperty, textShadowProperty } from './label-common';

export { createNativeAttributedString, enableIOSDTCoreText } from '@nativescript-community/text';
export * from './label-common';
Expand Down Expand Up @@ -195,6 +190,8 @@ abstract class LabelBase extends View implements LabelViewDefinition {
public html: string;
@cssProperty selectable: boolean;

_isSingleLine: boolean;

public mIsSingleLine: boolean;

public text: string;
Expand All @@ -217,6 +214,8 @@ abstract class LabelBase extends View implements LabelViewDefinition {
@cssProperty lineBreak: LineBreak;
@cssProperty textAlignment: CoreTypes.TextAlignmentType;
@cssProperty textDecoration: CoreTypes.TextDecorationType;

//@ts-ignore
@cssProperty textTransform: CoreTypes.TextTransformType;
@cssProperty whiteSpace: CoreTypes.WhiteSpaceType;

Expand Down
17 changes: 4 additions & 13 deletions src/label.ios.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import {
LightFormattedString,
VerticalTextAlignment,
computeBaseLineOffset,
createNativeAttributedString,
usingIOSDTCoreText,
verticalTextAlignmentProperty
} from '@nativescript-community/text';
import { Color, CoreTypes, Font, FormattedString, Span, View } from '@nativescript/core';
import { VerticalTextAlignment, createNativeAttributedString, verticalTextAlignmentProperty } from '@nativescript-community/text';
import { Color, CoreTypes, Font, FormattedString, View } from '@nativescript/core';
import {
borderBottomWidthProperty,
borderLeftWidthProperty,
borderRightWidthProperty,
borderTopWidthProperty,
colorProperty,
fontInternalProperty,
paddingBottomProperty,
paddingLeftProperty,
Expand All @@ -22,10 +14,10 @@ import {
import {
formattedTextProperty,
letterSpacingProperty,
textDecorationProperty,
lineHeightProperty,
whiteSpaceProperty
} from '@nativescript/core/ui/text-base';
import { getClosestPropertyValue, lineHeightProperty } from '@nativescript/core/ui/text-base/text-base-common';
import { maxLinesProperty } from '@nativescript/core/ui/text-base/text-base-common';
import { isNullOrUndefined, isString } from '@nativescript/core/utils/types';
import { iOSNativeHelper, layout } from '@nativescript/core/utils/utils';
import { TextShadow } from './label';
Expand All @@ -36,7 +28,6 @@ import {
lineBreakProperty,
linkColorProperty,
linkUnderlineProperty,
maxLinesProperty,
needFormattedStringComputation,
selectableProperty,
textShadowProperty
Expand Down

0 comments on commit 36763fd

Please sign in to comment.