From 70c9ed20d06db54556da7056634f84570f96cef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Wa=C5=9Bko?= Date: Tue, 23 Mar 2021 22:45:25 +0100 Subject: [PATCH] CHANGELOG, formatting --- CHANGELOG.md | 4 ++++ .../src/builtin/visualization/java_script/sql.js | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bf2996e22..84ceb1c189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ will be lost. In this build we added notification in statusbar to signalize that the connection was lost and IDE must be restarted. In future IDE will try to automatically reconnect. +- [Database Visualizations][1335]. Visualizations for the Database library have + been added: the Table visualization now automatically executes the underlying + query to display its results in a table and a SQL Query visualization allows + to see the query that is going to be run in the database.
![Bug Fixes](/docs/assets/tags/bug_fixes.svg) diff --git a/src/rust/ide/view/graph-editor/src/builtin/visualization/java_script/sql.js b/src/rust/ide/view/graph-editor/src/builtin/visualization/java_script/sql.js index 0b52c2f40e..c95806f913 100644 --- a/src/rust/ide/view/graph-editor/src/builtin/visualization/java_script/sql.js +++ b/src/rust/ide/view/graph-editor/src/builtin/visualization/java_script/sql.js @@ -220,7 +220,7 @@ class SqlVisualization extends Visualization { const dom = this.dom let tooltipOwner = null function interpolationMouseEnter(event) { - const target = this.parentElement.getElementsByClassName("mismatch")[0] + const target = this.parentElement.getElementsByClassName('mismatch')[0] const fg = target.getAttribute('data-fgColorHover') const bg = target.getAttribute('data-bgColorHover') const message = decodeURIComponent(target.getAttribute('data-message')) @@ -235,12 +235,13 @@ class SqlVisualization extends Visualization { const scrollElement = pre.parentElement const scrollX = scrollElement.scrollLeft const scrollY = scrollElement.scrollTop - const x = container.offsetLeft - tooltip.offsetWidth / 2 + container.offsetWidth / 2 - scrollX + const x = + container.offsetLeft - tooltip.offsetWidth / 2 + container.offsetWidth / 2 - scrollX const y = container.offsetTop - elem.offsetTop - pre.offsetTop - scrollY - 160 tooltip.style.transform = 'translate(' + x + 'px, ' + y + 'px)' } function interpolationMouseLeave(event) { - const target = this.parentElement.getElementsByClassName("mismatch")[0] + const target = this.parentElement.getElementsByClassName('mismatch')[0] const fg = target.getAttribute('data-fgColor') const bg = target.getAttribute('data-bgColor') target.style.color = fg