Skip to content

Commit e2e8ccb

Browse files
committed
chore: lin
1 parent 3b363b0 commit e2e8ccb

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

src/ui-pager/index.android.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import { ChangeType, Color, Device, ObservableArray, Property, Screen, StackLayout, Utils, View, ViewBase, profile } from '@nativescript/core';
1+
import { ChangeType, Device, Property, StackLayout, Utils, View, ViewBase, profile } from '@nativescript/core';
22
import { KeyedTemplate } from '@nativescript/core/ui/core/view';
33
import { isString } from '@nativescript/core/utils/types';
44
import {
55
ItemEventData,
66
Orientation,
77
PagerBase,
8-
Transformer,
98
autoPlayProperty,
109
autoplayDelayProperty,
1110
disableSwipeProperty,

src/ui-pager/index.common.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@ import {
33
Builder,
44
CSSType,
55
CoercibleProperty,
6-
Color,
76
ContainerView,
87
CoreTypes,
98
GridLayout,
109
ItemsSource,
1110
KeyedTemplate,
1211
Label,
13-
Length,
1412
Observable,
1513
ObservableArray,
16-
PercentLength,
1714
Property,
1815
Template,
1916
Trace,
@@ -302,7 +299,7 @@ export abstract class PagerBase extends ContainerView implements AddChildFromBui
302299
super.onLayout(left, top, right, bottom);
303300
this._effectiveItemWidth = this.getMeasuredWidth() - this.effectivePaddingLeft - this.effectivePaddingRight;
304301
this._effectiveItemHeight = this.getMeasuredHeight() - this.effectivePaddingTop - this.effectivePaddingBottom;
305-
if (global.isIOS && this.iosOverflowSafeAreaEnabled) {
302+
if (__IOS__ && this.iosOverflowSafeAreaEnabled) {
306303
const safeArea = this.getSafeAreaInsets();
307304
this._effectiveItemHeight += safeArea.top + safeArea.bottom;
308305
}
@@ -311,9 +308,9 @@ export abstract class PagerBase extends ContainerView implements AddChildFromBui
311308
public convertToSize(length): number {
312309
let size = 0;
313310
if (this.orientation === 'horizontal') {
314-
size = global.isIOS ? Utils.layout.getMeasureSpecSize((this as any)._currentWidthMeasureSpec) : this.getMeasuredWidth();
311+
size = __IOS__ ? Utils.layout.getMeasureSpecSize((this as any)._currentWidthMeasureSpec) : this.getMeasuredWidth();
315312
} else {
316-
size = global.isIOS ? Utils.layout.getMeasureSpecSize((this as any)._currentHeightMeasureSpec) : this.getMeasuredHeight();
313+
size = __IOS__ ? Utils.layout.getMeasureSpecSize((this as any)._currentHeightMeasureSpec) : this.getMeasuredHeight();
317314
}
318315

319316
let converted = 0;
@@ -378,7 +375,7 @@ circularModeProperty.register(PagerBase);
378375
export const selectedIndexProperty = new CoercibleProperty<PagerBase, number>({
379376
name: 'selectedIndex',
380377
defaultValue: -1,
381-
// affectsLayout: global.isIOS,
378+
// affectsLayout: __IOS__,
382379
coerceValue: (target, value) => {
383380
const items = target._childrenCount;
384381
if (items) {

src/ui-pager/index.ios.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ChangeType, Color, EventData, KeyedTemplate, Observable, ObservableArray, Property, ProxyViewContainer, StackLayout, Utils, View, ViewBase, profile } from '@nativescript/core';
1+
import { ChangeType, EventData, KeyedTemplate, Observable, Property, ProxyViewContainer, StackLayout, Utils, View, ViewBase, profile } from '@nativescript/core';
22
import {
33
ItemEventData,
44
Orientation,
@@ -9,8 +9,7 @@ import {
99
itemTemplatesProperty,
1010
itemsProperty,
1111
orientationProperty,
12-
selectedIndexProperty,
13-
showIndicatorProperty
12+
selectedIndexProperty
1413
} from './index.common';
1514

1615
export * from './index.common';

0 commit comments

Comments
 (0)