Commit d4e18248 authored by Ravi Vagadia's avatar Ravi Vagadia

issue-612 - grey out content instead of showing loader.

added a new function setUpdating in DropdownPanel which greys out conent of dropdown while its waiting for updated value.
parent ac571688
......@@ -67,10 +67,17 @@ DropdownPanel.prototype.setLoading = function () {
}
}
DropdownPanel.prototype.setUpdating = function () {
if (this.view) {
this.view.querySelector('.dropdownpanel .dropdowncontent').style.color = 'gray'
}
}
DropdownPanel.prototype.update = function (_data, _header) {
if (this.view) {
this.view.querySelector('.dropdownpanel .fa-refresh').style.display = 'none'
this.view.querySelector('.dropdownpanel .dropdowncontent').style.display = 'block'
this.view.querySelector('.dropdownpanel .dropdowncontent').style.color = 'black'
this.view.querySelector('.dropdownpanel .dropdownrawcontent').innerText = JSON.stringify(_data, null, '\t')
this.view.querySelector('.dropdownpanel button.btn').style.display = 'block'
this.view.querySelector('.title span').innerText = _header || ' '
......
......@@ -33,7 +33,6 @@ class SolidityLocals {
init () {
var decodeTimeout = null
this.parent.event.register('sourceLocationChanged', this, (sourceLocation) => {
this.basicPanel.setMessage('')
if (!this.storageResolver) {
this.basicPanel.setMessage('storage not ready')
return
......@@ -41,7 +40,7 @@ class SolidityLocals {
if (decodeTimeout) {
window.clearTimeout(decodeTimeout)
}
this.basicPanel.setLoading()
this.basicPanel.setUpdating()
decodeTimeout = setTimeout(() => {
decode(this, sourceLocation)
}, 500)
......
......@@ -38,7 +38,6 @@ SolidityState.prototype.init = function () {
var self = this
var decodeTimeout = null
this.parent.event.register('indexChanged', this, function (index) {
self.basicPanel.setMessage('')
if (index < 0) {
self.basicPanel.setMessage('invalid step index')
return
......@@ -56,7 +55,7 @@ SolidityState.prototype.init = function () {
if (decodeTimeout) {
window.clearTimeout(decodeTimeout)
}
self.basicPanel.setLoading()
self.basicPanel.setUpdating()
decodeTimeout = setTimeout(() => {
decode(self, index)
}, 500)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment