diff --git a/src/app/editor/contextView.js b/src/app/editor/contextView.js
index 0ebbfe9824..ed0a524153 100644
--- a/src/app/editor/contextView.js
+++ b/src/app/editor/contextView.js
@@ -36,19 +36,17 @@ class ContextView {
this.update()
})
this.contextualListener.event.register('stopHighlighting', () => {
- this.hide()
})
}
render () {
- const view = yo`
+ const view = yo`
`
if (!this._view) {
this._view = view
- this.hide()
}
return view
}
@@ -68,7 +66,6 @@ class ContextView {
update () {
if (this._view) {
yo.update(this._view, this.render())
- this._view.style.display = this._current ? 'block' : 'none'
}
}
@@ -169,14 +166,13 @@ class ContextView {
}
}
- return yo`
+ return yo`
${showGasEstimation()}
${type}
${node.attributes.name}
${references}
- ${showGasEstimation()}
`
}
}
diff --git a/src/app/editor/styles/contextView-styles.js b/src/app/editor/styles/contextView-styles.js
index edf59d5609..9ad3095886 100644
--- a/src/app/editor/styles/contextView-styles.js
+++ b/src/app/editor/styles/contextView-styles.js
@@ -2,7 +2,9 @@ var csjs = require('csjs-inject')
var css = csjs`
.contextview {
- opacity : 1;
+ opacity : 1;
+ position : relative;
+ height : 20px;
}
.container {
padding : 1px 15px;
@@ -14,7 +16,7 @@ var css = csjs`
text-overflow : ellipsis;
overflow : hidden;
white-space : nowrap;
- font-size : 18px;
+ font-size : 13px;
}
.type {
font-style : italic;
@@ -35,7 +37,7 @@ var css = csjs`
margin-left : 15px;
}
.gasEstimation {
- margin-left: 15px;
+ margin-right: 15px;
display: flex;
align-items: center;
}
@@ -44,12 +46,10 @@ var css = csjs`
margin-right: 5px;
}
.contextviewcontainer{
- position : absolute;
- top : 35px;
z-index : 50;
- left : 40%;
border-radius : 1px;
border : 2px solid var(--secondary);
+ transition: all 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}
`
diff --git a/src/app/panels/editor-panel.js b/src/app/panels/editor-panel.js
index 1e8e70d411..f6eccd3a7f 100644
--- a/src/app/panels/editor-panel.js
+++ b/src/app/panels/editor-panel.js
@@ -71,17 +71,19 @@ class EditorPanel {
// we check upstream for "fileChanged"
self._view.editor.style.display = 'block'
self._view.mainPanel.style.display = 'none'
+ self._components.contextView.show()
})
self.tabProxy.event.on('switchFile', (file) => {
self._view.editor.style.display = 'block'
self._view.mainPanel.style.display = 'none'
+ self._components.contextView.show()
})
self.tabProxy.event.on('closeFile', (file) => {
})
self.tabProxy.event.on('switchApp', showApp)
self.tabProxy.event.on('closeApp', (name) => {
self._view.editor.style.display = 'block'
- self._components.contextView.hide()
+ self._components.contextView.show()
self._view.mainPanel.style.display = 'none'
})
self.data = {
@@ -181,9 +183,9 @@ class EditorPanel {
self._view.content = yo`
${self.tabProxy.renderTabsbar()}
- ${self._components.contextView.render()}
${self._view.editor}
${self._view.mainPanel}
+ ${self._components.contextView.render()}
${self._view.terminal}
`