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