mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
Pivot implementation and redesign (#69)
- Pivot support implementation - Rename queries into inquiries - Rename editor into workspace - Change result set format - New JSON format for inquiries - Redesign panels
This commit is contained in:
@@ -6,10 +6,28 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tooltipElement () {
|
||||
return this.$refs.tooltip
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showTooltip (e) {
|
||||
this.tooltipStyle.top = e.clientY - 12 + 'px'
|
||||
this.tooltipStyle.left = e.clientX + 12 + 'px'
|
||||
showTooltip (e, tooltipPosition) {
|
||||
const position = tooltipPosition ? tooltipPosition.split('-') : ['top', 'right']
|
||||
const offset = 12
|
||||
|
||||
if (position[0] === 'top') {
|
||||
this.tooltipStyle.top = e.clientY - offset + 'px'
|
||||
} else {
|
||||
this.tooltipStyle.top = e.clientY + offset + 'px'
|
||||
}
|
||||
|
||||
if (position[1] === 'right') {
|
||||
this.tooltipStyle.left = e.clientX + offset + 'px'
|
||||
} else {
|
||||
this.tooltipStyle.left = e.clientX - offset - this.tooltipElement.offsetWidth + 'px'
|
||||
}
|
||||
|
||||
this.tooltipStyle.visibility = 'visible'
|
||||
},
|
||||
hideTooltip () {
|
||||
|
||||
Reference in New Issue
Block a user