Commit 0f60ad47 authored by yann300's avatar yann300

renaming formatData / formatSelf

parent 404815b9
......@@ -12,7 +12,7 @@ class SolidityLocals {
this.traceManager = _traceManager
this.basicPanel = new DropdownPanel('Solidity Locals', {
json: true,
formatData: solidityTypeFormatter.formatData,
formatSelf: solidityTypeFormatter.formatSelf,
extractData: solidityTypeFormatter.extractData
})
this.init()
......
......@@ -11,7 +11,7 @@ function SolidityState (_parent, _traceManager, _codeManager, _solidityProxy) {
this.solidityProxy = _solidityProxy
this.basicPanel = new DropdownPanel('Solidity State', {
json: true,
formatData: solidityTypeFormatter.formatData,
formatSelf: solidityTypeFormatter.formatSelf,
extractData: solidityTypeFormatter.extractData
})
this.init()
......
......@@ -3,11 +3,11 @@ var yo = require('yo-yo')
var BN = require('ethereumjs-util').BN
module.exports = {
formatData: formatData,
formatSelf: formatSelf,
extractData: extractData
}
function formatData (key, data) {
function formatSelf (key, data) {
var style = fontColor(data)
var keyStyle = data.isProperty ? 'color:#847979' : ''
if (data.type === 'string') {
......
......@@ -11,7 +11,7 @@ class TreeView {
this.beforeJsonNodeRendered = opts.beforeJsonNodeRendered || noop
this.beforeJsonValueRendered = opts.beforeJsonValueRendered || noop
this.extractData = opts.extractData || this.extractDataDefault
this.formatData = opts.formatData || this.formatDataDefault
this.formatSelf = opts.formatSelf || this.formatSelfDefault
this.view = null
this.cssLabel = ui.formatCss(opts.css || {}, style.label)
this.cssUl = ui.formatCss(opts.css || {}, style.cssUl)
......@@ -38,7 +38,7 @@ class TreeView {
var children = (data.children || []).map((child, index) => {
return this.renderObject(child.value, data, child.key, expand, keyPath + '_' + child.key)
})
return this.formatDataInternal(key, data, children, expand, keyPath)
return this.formatData(key, data, children, expand, keyPath)
}
renderProperties (json, expand) {
......@@ -48,8 +48,8 @@ class TreeView {
return yo`<ul style=${this.cssUl}>${children}</ul>`
}
formatDataInternal (key, data, children, expand, keyPath) {
var label = yo`<span style=${this.cssLabel}><label style=${ui.formatCss(style.caret)}></label><span style=${ui.formatCss(style.data)}>${this.formatData(key, data)}</span></span>`
formatData (key, data, children, expand, keyPath) {
var label = yo`<span style=${this.cssLabel}><label style=${ui.formatCss(style.caret)}></label><span style=${ui.formatCss(style.data)}>${this.formatSelf(key, data)}</span></span>`
var renderedChildren = ''
if (children.length) {
renderedChildren = yo`<ul style=${this.cssUl}>${children}</ul>`
......@@ -66,7 +66,7 @@ class TreeView {
return yo`<li style=${this.cssLi}>${label}${renderedChildren}</li>`
}
formatDataDefault (key, data) {
formatSelfDefault (key, data) {
return yo`<label>${key}: ${data.self}</label>`
}
......
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