diff --git a/apps/app/ui-tests-app/issues/issue-3007.css b/apps/app/ui-tests-app/issues/issue-3007.css
new file mode 100644
index 000000000..a90f281a9
--- /dev/null
+++ b/apps/app/ui-tests-app/issues/issue-3007.css
@@ -0,0 +1,11 @@
+.container {
+ width: 200;
+ height: 200;
+ clip-path: polygon(50% 3%, 3% 100%, 100% 100%);
+ background-color: black;
+}
+.elementStyle {
+ width: 200;
+ height: 200;
+ clip-path: polygon(50% 3%, 3% 100%, 100% 100%);
+}
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/issues/issue-3007.xml b/apps/app/ui-tests-app/issues/issue-3007.xml
new file mode 100644
index 000000000..c58ce144a
--- /dev/null
+++ b/apps/app/ui-tests-app/issues/issue-3007.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/app/ui-tests-app/issues/main-page.ts b/apps/app/ui-tests-app/issues/main-page.ts
index 72dfaa9d6..fef4539a5 100644
--- a/apps/app/ui-tests-app/issues/main-page.ts
+++ b/apps/app/ui-tests-app/issues/main-page.ts
@@ -14,6 +14,7 @@ export function pageLoaded(args: EventData) {
examples.set("2911", "issues/issue-2911");
examples.set("2674", "issues/issue-2674");
examples.set("2942", "issues/issue-2942");
+ examples.set("3007", "issues/issue-3007");
let viewModel = new SubMianPageViewModel(wrapLayout, examples);
page.bindingContext = viewModel;
diff --git a/tns-core-modules/ui/styling/background.android.ts b/tns-core-modules/ui/styling/background.android.ts
index 51e5fd1d2..901d0986d 100644
--- a/tns-core-modules/ui/styling/background.android.ts
+++ b/tns-core-modules/ui/styling/background.android.ts
@@ -67,7 +67,7 @@ export module ad {
_defaultBackgrounds.set(viewClass, nativeView.getBackground());
}
- backgroundDrawable = new org.nativescript.widgets.BorderDrawable(density);
+ backgroundDrawable = new org.nativescript.widgets.BorderDrawable(density, v.toString());
refreshBorderDrawable(v, backgroundDrawable);
nativeView.setBackground(backgroundDrawable);
}
@@ -116,6 +116,7 @@ export module ad {
}
function refreshBorderDrawable(view: view.View, borderDrawable: org.nativescript.widgets.BorderDrawable){
+ //console.log(`>>> refreshBorderDrawable(${view})...`);
let background = view.style._getValue(style.backgroundInternalProperty);
if (background){
let backgroundPositionParsedCSSValues: native.Array = null;
@@ -154,6 +155,7 @@ function refreshBorderDrawable(view: view.View, borderDrawable: org.nativescript
background.size,
backgroundSizeParsedCSSValues
);
+ //console.log(`>>> ${borderDrawable.toDebugString()}`);
}
}
diff --git a/tns-platform-declarations/android/org.nativescript.widgets.d.ts b/tns-platform-declarations/android/org.nativescript.widgets.d.ts
index 0ff9ed7e1..376009c44 100644
--- a/tns-platform-declarations/android/org.nativescript.widgets.d.ts
+++ b/tns-platform-declarations/android/org.nativescript.widgets.d.ts
@@ -47,6 +47,7 @@
export class BorderDrawable extends android.graphics.drawable.ColorDrawable {
constructor(density: number);
+ constructor(density: number, id: string);
public refresh(
borderTopColor: number,
borderRightColor: number,
@@ -104,6 +105,8 @@
public hasUniformBorderWidth(): boolean;
public hasUniformBorderRadius(): boolean;
public hasUniformBorder(): boolean;
+
+ public toDebugString(): string;
}
export class CSSValue {