Fix: java.lang.NumberFormatException when applying clip-path with percentage values

Resolves #3007
This commit is contained in:
Rossen Hristov
2016-11-02 16:59:06 +02:00
parent d045306a2c
commit 28f084e7d2
5 changed files with 28 additions and 1 deletions

View File

@@ -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%);
}

View File

@@ -0,0 +1,10 @@
<Page id="Page" xmlns="http://schemas.nativescript.org/tns.xsd">
<StackLayout id="StackLayout">
<Image id="Image" width="100" height="100" class="elementStyle" src="~/ui-tests-app/image-view/gravatar.png"/>
<Button id="Button" backgroundColor="blue" class="elementStyle" text="TAP" />
<Label id="Label" backgroundColor="red" class="elementStyle" text="sample label" textWrap="true"/>
<TextField id="TextField" backgroundColor="green" class="elementStyle" hint="" text="Sample textfield" />
<TextView id="TextView" class="elementStyle" text="Sample text view" backgroundColor="yellow" editable="true" />
<AbsoluteLayout id="AbsoluteLayout" class="container"/>
</StackLayout>
</Page>

View File

@@ -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;