[Minor] Propagate for to paper-badge
This commit is contained in:
parent
69e8c9c677
commit
6e4fab9395
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "strolch-wc-badge",
|
"name": "strolch-wc-badge",
|
||||||
"description": "Strolch WebComponent Badge",
|
"description": "Strolch WebComponent Badge",
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Robert von Burg"
|
"Robert von Burg"
|
||||||
],
|
],
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<paper-badge id="badge" label="[[label]]"></paper-badge>
|
<paper-badge id="badge" label="[[label]]" for="[[for]]"></paper-badge>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -40,6 +40,9 @@
|
||||||
|
|
||||||
<!-- Properties -->
|
<!-- Properties -->
|
||||||
properties: {
|
properties: {
|
||||||
|
for: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
hide: {
|
hide: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
observer: "observeHide"
|
observer: "observeHide"
|
||||||
|
@ -65,13 +68,11 @@
|
||||||
// show this element before the animation is started
|
// show this element before the animation is started
|
||||||
this.hidden = false;
|
this.hidden = false;
|
||||||
|
|
||||||
// animated to show this badge
|
// animated to show/hide this badge
|
||||||
if(newValue == false) {
|
if(newValue) {
|
||||||
this.playAnimation("show");
|
|
||||||
}
|
|
||||||
// animated to hide this badge
|
|
||||||
else {
|
|
||||||
this.playAnimation("hide");
|
this.playAnimation("hide");
|
||||||
|
} else {
|
||||||
|
this.playAnimation("show");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue