@@ -9,10 +9,12 @@ import {
99 ClickInteraction
1010} from ' @neo4j-nvl/interaction-handlers'
1111import { useQuasar } from ' quasar'
12+ import interact from ' interactjs'
1213
1314const Neo4jApi = inject (' Neo4jApi' )
15+ const GlobalVariables = inject (' GlobalVariables' )
1416const emit = defineEmits ([' nodeExpanded' , ' nodeUnexpanded' , ' nodeDeleted' ])
15- const props = defineProps ([' nodes' , ' relationships' , ' expandedNodesState' ])
17+ const props = defineProps ([' nodes' , ' relationships' , ' expandedNodesState' , ' disableResizer ' ])
1618
1719const q = useQuasar ()
1820const expandedNodesMap = ref (props .expandedNodesState )
@@ -34,6 +36,7 @@ const nodeRightClickMenu = ref({
3436 node: null ,
3537 clicked: false
3638})
39+ const graphOverviewPanelWidth = ref (` ${ GlobalVariables .graphOverviewPanelWidth } px` )
3740
3841const options = {
3942 disableTelemetry: true ,
@@ -293,6 +296,25 @@ const init = (nodes, relationships) => {
293296
294297onMounted (async () => {
295298 init (props .nodes , props .relationships )
299+ if (! props .disableResizer ) {
300+ interact (overview .value )
301+ .origin (' self' )
302+ .resizable ({
303+ edges: { top: false , left: true , bottom: false , right: false },
304+ inertia: true ,
305+ listeners: {
306+ move : (event ) => {
307+ overview .value .style .width = ` ${ event .rect .width } px`
308+ }
309+ },
310+ modifiers: [
311+ interact .modifiers .restrictSize ({
312+ min: { width: GlobalVariables .graphOverviewPanelWidth },
313+ max: { width: 800 }
314+ })
315+ ]
316+ })
317+ }
296318})
297319
298320onUnmounted (() => {
@@ -343,7 +365,8 @@ onUnmounted(() => {
343365 < / q- list>
344366 < / q- menu>
345367 < / div>
346- < q- card class = " overview" ref= " overview" >
368+ < div class = " overview" ref= " overview" >
369+ < q- card class = " overview-card" >
347370 < q- bar class = " fixed-top overview-bar" >
348371 < div class = " row justify-between" style= " width: 100%" >
349372 < q- btn icon= " zoom_in" flat square color= " white" @click= " zoomIn" / >
@@ -416,6 +439,7 @@ onUnmounted(() => {
416439 < / q- markup- table>
417440 < / q- card- section>
418441 < / q- card>
442+ < / div>
419443 < / div>
420444< / template>
421445
@@ -431,13 +455,17 @@ onUnmounted(() => {
431455 position: absolute;
432456 top: 0px ;
433457 right: 0px ;
434- width: 250px ;
458+ width: v- bind (' graphOverviewPanelWidth' );
459+ height: 100 % ;
460+ overflow- y: auto;
461+ }
462+ .overview - card {
435463 height: 100 % ;
464+ overflow- y: auto;
436465 border- top- left- radius: 4px ;
437466 border- top- right- radius: 0px ;
438467 border- bottom- left- radius: 0px ;
439468 border- bottom- right- radius: 0px ;
440- overflow- y: auto;
441469}
442470.overview - property- key {
443471 max- width: 70px ;
0 commit comments