From 052e4742f51b7280416b219d89819276d2f69888 Mon Sep 17 00:00:00 2001 From: David Mosbach Date: Sat, 3 Jun 2023 18:33:55 +0200 Subject: [PATCH] focus searched nodes/edges on the canvas --- editor.css | 29 +++++++++++++++++++++++++--- editor.html | 5 +++-- editor.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 82 insertions(+), 6 deletions(-) diff --git a/editor.css b/editor.css index 1fd239e..6ca7b09 100644 --- a/editor.css +++ b/editor.css @@ -55,7 +55,12 @@ body { color: rgb(75, 151, 151); } -.submenu #search-container { +#searchmenu { + width: 400px; + overflow: hidden; +} + +#searchmenu #search-container { /* position: fixed; top: 0px; bottom: 0px; */ @@ -71,7 +76,7 @@ body { #search-container input { /* height: 100%; */ height: 40px; - width: 300px; + width: 100%; border-radius: 15px; border: 1px solid rgb(117, 117, 117); padding-left: 10px; @@ -123,12 +128,30 @@ body { #search-results { display: none; position: relative; - min-height: 20px; padding: 20 20 20 20; overflow-y: auto; overflow-x: hidden; } +#search-results div { + line-height: 2; + padding-top: 5px; + padding-bottom: 5px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + transition: all 100ms ease-out 50ms; +} + +#search-results div:hover { + font-weight: 500; + color: rgb(75, 151, 151); +} + +#search-results div:active { + font-weight: 600; +} + .submenu { font-family: 'Inter'; width: fit-content; diff --git a/editor.html b/editor.html index bf8abd5..58638d5 100644 --- a/editor.html +++ b/editor.html @@ -5,6 +5,7 @@ + @@ -126,9 +127,9 @@