Skip to content

Commit

Permalink
adjust zoom for big ones and changer search behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofstetter Benjamin (extern) committed Feb 7, 2025
1 parent 1b60829 commit 001f7ba
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 65 deletions.
137 changes: 75 additions & 62 deletions src-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ function makeEditorBig() {
function toggleSearch () {
showSearchPanel.value = !showSearchPanel.value;
if (showSearchPanel.value) {
hideEditorSplitterPanel.value = true;
window.setTimeout(() => {
fitView({
duration: 1000, // use this if you want a smooth transition to the node
padding: 0.3 // use this for some padding around the node
})
})
}
}
function onFormatChange(rdfSerializationType: RdfSerializationType) {
Expand Down Expand Up @@ -102,7 +111,7 @@ function onNdeSelected(term: Term) {
</template>
</Toolbar>

<Splitter style="height: calc(100vh - (67.5px + ( 2 * 8px) + 8px) ); margin-top: 8px" class="mb-8">
<Splitter :style="{ height: showSearchPanel ? 'calc(60vh - (67.5px + ( 2 * 8px) + 8px) )' : 'calc(100vh - (67.5px + ( 2 * 8px) + 8px) )' }" style="margin-top: 8px;" class="mb-8">

<SplitterPanel :style="{ display: hideEditorSplitterPanel ? 'none' : 'flex' }" class="flex items-center justify-center">
<RdfEditor :format="currentSerialization" @change="onQuadsChanged" @format-change="onFormatChange"/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/GraphView.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div style="height: 100%; width:100%">
<VueFlow :nodes="nodes" :edges="edges" :min-zoom="0.05" :max-zoom="10" @node-drag="onNodeDrag" @edge-click="zoomToNode" >
<VueFlow :nodes="nodes" :edges="edges" :min-zoom="0.00005" :max-zoom="10" @node-drag="onNodeDrag" @edge-click="zoomToNode" >

<template #node-custom="customNodeProps">
<ResourceNode v-bind="customNodeProps" />
Expand Down
2 changes: 1 addition & 1 deletion vscode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@

setTimeout(() => {
const evtMessage = {
rdfString: shortTTL,
rdfString: longTTL,
contentType: "text/turtle"
}
const event = new CustomEvent('sketch.updateContent', { detail: evtMessage });
Expand Down

0 comments on commit 001f7ba

Please sign in to comment.