|
1 | 1 | /* eslint-disable no-redeclare */ |
2 | | -import { Color, HorizontalAlignment, Length, Observable, PercentLength, Utils, VerticalAlignment, Visibility } from '@nativescript/core'; |
| 2 | +import { Color, CoreTypes, Length, Observable, PercentLength, Utils } from '@nativescript/core'; |
3 | 3 | import { booleanConverter } from '@nativescript/core/ui/core/view-base'; |
4 | 4 | import { Canvas, CanvasView, Cap, Join, Paint, PorterDuffXfermode, Style } from '../canvas'; |
5 | 5 | import { parseCap, parseDashEffect, parseJoin, parseShadow, parseType } from '../utils'; |
@@ -41,7 +41,7 @@ function parseThickness(value: string) { |
41 | 41 | top, |
42 | 42 | right, |
43 | 43 | bottom, |
44 | | - left, |
| 44 | + left |
45 | 45 | }; |
46 | 46 | } else { |
47 | 47 | return value; |
@@ -105,15 +105,15 @@ function shapePropertyGenerator(target: Object, key: string | symbol, options?: |
105 | 105 | get: createGetter(key, options), |
106 | 106 | set: createSetter(key, options), |
107 | 107 | enumerable: true, |
108 | | - configurable: true, |
| 108 | + configurable: true |
109 | 109 | }); |
110 | 110 |
|
111 | 111 | // for svelte! |
112 | 112 | Object.defineProperty(target, key.toString().toLowerCase(), { |
113 | 113 | get: createGetter(key, options), |
114 | 114 | set: createSetter(key, options), |
115 | 115 | enumerable: true, |
116 | | - configurable: true, |
| 116 | + configurable: true |
117 | 117 | }); |
118 | 118 | } |
119 | 119 | // export function shapeProperty(target: any, k?, desc?: PropertyDescriptor): any; |
@@ -217,23 +217,23 @@ export default abstract class Shape extends Observable { |
217 | 217 | @booleanProperty({ paintGetterName: 'isAntiAlias', paintSetterName: 'setAntiAlias' }) antiAlias: boolean; |
218 | 218 | @colorProperty({ |
219 | 219 | converter: parseShadow, |
220 | | - paintSetter: applyShadow, |
| 220 | + paintSetter: applyShadow |
221 | 221 | }) |
222 | 222 | shadow: Shadow; |
223 | | - @stringProperty({ nonPaintProp: true }) visibility: Visibility = 'visible'; |
224 | | - @stringProperty({ nonPaintProp: true }) horizontalAlignment: HorizontalAlignment & 'middle'; |
225 | | - @stringProperty({ nonPaintProp: true }) verticalAlignment: VerticalAlignment & 'center'; |
| 223 | + @stringProperty({ nonPaintProp: true }) visibility: CoreTypes.VisibilityType = 'visible'; |
| 224 | + @stringProperty({ nonPaintProp: true }) horizontalAlignment: CoreTypes.HorizontalAlignmentType & 'middle'; |
| 225 | + @stringProperty({ nonPaintProp: true }) verticalAlignment: CoreTypes.VerticalAlignmentType & 'center'; |
226 | 226 |
|
227 | | - @percentLengthProperty({ nonPaintProp: true }) width: PercentLength; |
228 | | - @percentLengthProperty({ nonPaintProp: true }) height: PercentLength; |
| 227 | + @percentLengthProperty({ nonPaintProp: true }) width: CoreTypes.PercentLengthType; |
| 228 | + @percentLengthProperty({ nonPaintProp: true }) height: CoreTypes.PercentLengthType; |
229 | 229 |
|
230 | | - @percentLengthProperty({ nonPaintProp: true }) paddingLeft: PercentLength; |
231 | | - @percentLengthProperty({ nonPaintProp: true }) paddingRight: PercentLength; |
232 | | - @percentLengthProperty({ nonPaintProp: true }) paddingBottom: PercentLength; |
233 | | - @percentLengthProperty({ nonPaintProp: true }) paddingTop: PercentLength; |
| 230 | + @percentLengthProperty({ nonPaintProp: true }) paddingLeft: CoreTypes.PercentLengthType; |
| 231 | + @percentLengthProperty({ nonPaintProp: true }) paddingRight: CoreTypes.PercentLengthType; |
| 232 | + @percentLengthProperty({ nonPaintProp: true }) paddingBottom: CoreTypes.PercentLengthType; |
| 233 | + @percentLengthProperty({ nonPaintProp: true }) paddingTop: CoreTypes.PercentLengthType; |
234 | 234 |
|
235 | | - @percentLengthProperty({ nonPaintProp: true }) translateX: PercentLength = 0; |
236 | | - @percentLengthProperty({ nonPaintProp: true }) translateY: PercentLength = 0; |
| 235 | + @percentLengthProperty({ nonPaintProp: true }) translateX: CoreTypes.PercentLengthType = 0; |
| 236 | + @percentLengthProperty({ nonPaintProp: true }) translateY: CoreTypes.PercentLengthType = 0; |
237 | 237 | @numberProperty({ nonPaintProp: true }) rotate: number = 0; |
238 | 238 | @numberProperty({ nonPaintProp: true }) originX: number = 0; |
239 | 239 | @numberProperty({ nonPaintProp: true }) originY: number = 0; |
|
0 commit comments