Skip to content

Commit

Permalink
code format, added missing anotations
Browse files Browse the repository at this point in the history
  • Loading branch information
adi130987 committed Apr 24, 2018
1 parent 13dcddc commit e2a7208
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 29 deletions.
8 changes: 4 additions & 4 deletions etools-loading-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
'use strict';

window.EtoolsMixins = window.EtoolsMixins || {};
/*
* @polymer
* @mixinFunction
*/
/**
* @polymer
* @mixinFunction
*/
EtoolsMixins.LoadingMixin = Polymer.dedupingMixin(baseClass => class extends baseClass {
connectedCallback() {
super.connectedCallback();
Expand Down
56 changes: 31 additions & 25 deletions etools-loading.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,35 +86,41 @@
</template>

<script>
'use strict';
class EtoolsLoading extends Polymer.Element {
static get is() {
return 'etools-loading';
}
static get properties() {
return {
active: {
type: Boolean,
value: false,
reflectToAttribute: true,
observer: '_loadingStateChanged'
},
loadingText: {
type: String,
value: 'Loading data'
}
};
}
'use strict';

/**
* @polymer
* @customElement
*/
class EtoolsLoading extends Polymer.Element {
static get is() {
return 'etools-loading';
}

_loadingStateChanged(active) {
if (active) {
this.style.display = 'flex';
} else {
this.style.display = 'none';
static get properties() {
return {
active: {
type: Boolean,
value: false,
reflectToAttribute: true,
observer: '_loadingStateChanged'
},
loadingText: {
type: String,
value: 'Loading data'
}
};
}

_loadingStateChanged(active) {
if (active) {
this.style.display = 'flex';
} else {
this.style.display = 'none';
}
}
}

customElements.define(EtoolsLoading.is, EtoolsLoading);
customElements.define(EtoolsLoading.is, EtoolsLoading);
</script>
</dom-module>

0 comments on commit e2a7208

Please sign in to comment.