diff --git a/.vscode/launch.json b/.vscode/launch.json index f335d2443..abcaa7450 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,70 +1,41 @@ { "version": "0.2.0", "configurations": [ - { - "name": "Sync on iOS", - "type": "nativescript", - "platform": "ios", - "request": "launch", - "appRoot": "${workspaceRoot}", - "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "rebuild": false, - "syncAllFiles": false - }, { "name": "Launch on iOS", "type": "nativescript", - "platform": "ios", "request": "launch", + "platform": "ios", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "rebuild": true + "watch": true }, { "name": "Attach on iOS", "type": "nativescript", - "platform": "ios", "request": "attach", + "platform": "ios", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false - }, - { - "name": "Sync on Android", - "type": "nativescript", - "platform": "android", - "request": "launch", - "appRoot": "${workspaceRoot}", - "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "rebuild": false + "watch": false }, { "name": "Launch on Android", "type": "nativescript", - "platform": "android", "request": "launch", + "platform": "android", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "rebuild": true + "watch": true }, { "name": "Attach on Android", "type": "nativescript", - "platform": "android", "request": "attach", + "platform": "android", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false + "watch": false } ] } \ No newline at end of file diff --git a/apps/.vscode/launch.json b/apps/.vscode/launch.json index 95cc172ed..abcaa7450 100644 --- a/apps/.vscode/launch.json +++ b/apps/.vscode/launch.json @@ -1,77 +1,41 @@ { "version": "0.2.0", "configurations": [ - { - "name": "Sync on iOS", - "type": "nativescript", - "platform": "ios", - "request": "launch", - "appRoot": "${workspaceRoot}", - "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "rebuild": false, - "syncAllFiles": true, - "stopOnEntry": true - }, { "name": "Launch on iOS", "type": "nativescript", - "platform": "ios", "request": "launch", + "platform": "ios", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "rebuild": true, - "stopOnEntry": true + "watch": true }, { "name": "Attach on iOS", "type": "nativescript", - "platform": "ios", "request": "attach", + "platform": "ios", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "stopOnEntry": true - }, - { - "name": "Sync on Android", - "type": "nativescript", - "platform": "android", - "request": "launch", - "appRoot": "${workspaceRoot}", - "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "rebuild": false, - "syncAllFiles": true, - "stopOnEntry": true + "watch": false }, { "name": "Launch on Android", "type": "nativescript", - "platform": "android", "request": "launch", + "platform": "android", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "rebuild": true, - "stopOnEntry": true + "watch": true }, { "name": "Attach on Android", "type": "nativescript", - "platform": "android", "request": "attach", + "platform": "android", "appRoot": "${workspaceRoot}", "sourceMaps": true, - "diagnosticLogging": false, - "emulator": false, - "stopOnEntry": true + "watch": false } ] } \ No newline at end of file diff --git a/apps/.vscode/settings.json b/apps/.vscode/settings.json deleted file mode 100644 index 4367a83fc..000000000 --- a/apps/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - -} \ No newline at end of file diff --git a/tns-core-modules/ui/core/view-common.ts b/tns-core-modules/ui/core/view-common.ts index 8f53912db..5e977a41d 100644 --- a/tns-core-modules/ui/core/view-common.ts +++ b/tns-core-modules/ui/core/view-common.ts @@ -1997,8 +1997,8 @@ const fontProperty = new ShorthandProperty({ [fontFamilyProperty, unsetValue] ]; } else { - let font = parseFont(value); - let fontSize = parseFloat(font.fontSize); + const font = parseFont(value); + const fontSize = parseFloat(font.fontSize); return [ [fontStyleProperty, font.fontStyle], diff --git a/tns-core-modules/ui/styling/background.ios.ts b/tns-core-modules/ui/styling/background.ios.ts index 39aa5ae01..07c8ccae0 100644 --- a/tns-core-modules/ui/styling/background.ios.ts +++ b/tns-core-modules/ui/styling/background.ios.ts @@ -193,6 +193,22 @@ function drawNonUniformBorders(nativeView: NativeView, background: Background) { const lbi: Point = { x: nativeViewLayerBounds.left + left, y: nativeViewLayerBounds.bottom - bottom }; // left-bottom-inside let hasNonUniformBorder: boolean; + + // TODO: This is inefficient. + // We need to know what caused the change and reuse as much as possible. + if (nativeView.topBorderLayer) { + nativeView.topBorderLayer.removeFromSuperlayer(); + } + if (nativeView.rightBorderLayer) { + nativeView.rightBorderLayer.removeFromSuperlayer(); + } + if (nativeView.bottomBorderLayer) { + nativeView.bottomBorderLayer.removeFromSuperlayer(); + } + if (nativeView.leftBorderLayer) { + nativeView.leftBorderLayer.removeFromSuperlayer(); + } + const borderTopColor = background.borderTopColor; if (top > 0 && borderTopColor && borderTopColor.ios) { const topBorderPath = CGPathCreateMutable(); @@ -209,8 +225,6 @@ function drawNonUniformBorders(nativeView: NativeView, background: Background) { layer.addSublayer(topBorderLayer); nativeView.topBorderLayer = topBorderLayer; hasNonUniformBorder = true; - } else if (nativeView.topBorderLayer) { - nativeView.topBorderLayer.removeFromSuperlayer(); } const borderRightColor = background.borderRightColor; @@ -229,8 +243,6 @@ function drawNonUniformBorders(nativeView: NativeView, background: Background) { layer.addSublayer(rightBorderLayer); nativeView.rightBorderLayer = rightBorderLayer; hasNonUniformBorder = true; - } else if (nativeView.rightBorderLayer) { - nativeView.rightBorderLayer.removeFromSuperlayer(); } const borderBottomColor = background.borderBottomColor; @@ -249,8 +261,6 @@ function drawNonUniformBorders(nativeView: NativeView, background: Background) { layer.addSublayer(bottomBorderLayer); nativeView.bottomBorderLayer = bottomBorderLayer; hasNonUniformBorder = true; - } else if (nativeView.bottomBorderLayer) { - nativeView.bottomBorderLayer.removeFromSuperlayer(); } const borderLeftColor = background.borderLeftColor; @@ -269,8 +279,6 @@ function drawNonUniformBorders(nativeView: NativeView, background: Background) { layer.addSublayer(leftBorderLayer); nativeView.leftBorderLayer = leftBorderLayer; hasNonUniformBorder = true; - } else if (nativeView.leftBorderLayer) { - nativeView.leftBorderLayer.removeFromSuperlayer(); } nativeView.hasNonUniformBorder = hasNonUniformBorder;