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.
pull/3094/head
Ravi Vagadia 7 years ago
parent 261a3f2062
commit 8531920f13
  1. 7
      remix-debugger/src/ui/DropdownPanel.js
  2. 3
      remix-debugger/src/ui/SolidityLocals.js
  3. 3
      remix-debugger/src/ui/SolidityState.js

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

Loading…
Cancel
Save