Skip to content

Commit 1eff1d1

Browse files
committed
chore: wip
1 parent 01eeca1 commit 1eff1d1

File tree

1 file changed

+21
-21
lines changed
  • storage/framework/defaults/views/dashboard/models

1 file changed

+21
-21
lines changed

storage/framework/defaults/views/dashboard/models/index.vue

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -487,22 +487,22 @@ const createDiagram = () => {
487487
const g = svg.append('g')
488488
489489
// Apply initial zoom to see all content
490-
const initialScale = 0.55 // Further reduced scale to see more content
490+
const initialScale = 0.6 // Increased zoom by 10%
491491
svg.call(zoom.transform, d3.zoomIdentity.translate(width/2 - width*initialScale/2, 10).scale(initialScale))
492492
493493
// Set initial positions for models based on the reference image layout
494494
const initialPositions: Record<string, {x: number, y: number}> = {
495495
// Top row - more evenly spaced
496-
'team': { x: width * 0.2, y: 150 },
496+
'team': { x: width * 0.1, y: 150 },
497497
'user': { x: width * 0.5, y: 150 },
498498
'post': { x: width * 0.8, y: 150 },
499499
500500
// Second row - better distributed
501-
'accessToken': { x: width * 0.2, y: 500 }, // Moved down to avoid overlapping
501+
'accessToken': { x: width * 0.1, y: 550 }, // Further moved down to avoid overlapping
502502
'subscriber': { x: width * 0.8, y: 450 },
503503
504504
// Third row - more evenly spaced
505-
'project': { x: width * 0.2, y: 750 },
505+
'project': { x: width * 0.2, y: 1400 },
506506
'order': { x: width * 0.5, y: 750 },
507507
'subscriberEmail': { x: width * 0.8, y: 750 },
508508
@@ -584,9 +584,9 @@ const createDiagram = () => {
584584
node.append('rect')
585585
.attr('width', cardWidth)
586586
.attr('height', d => {
587-
const propsHeight = d.properties.length * 24
588-
const relationshipsHeight = d.relationships.length * 24 + 10
589-
return 60 + propsHeight + relationshipsHeight
587+
const propsHeight = d.properties.length * 22 // Reduced from 24
588+
const relationshipsHeight = d.relationships.length > 0 ? (d.relationships.length * 22 + 20) : 0 // Reduced from 24
589+
return 50 + propsHeight + relationshipsHeight // Reduced from 60
590590
})
591591
.attr('rx', 8)
592592
.attr('ry', 8)
@@ -598,10 +598,10 @@ const createDiagram = () => {
598598
node.append('rect')
599599
.attr('width', cardWidth)
600600
.attr('height', d => {
601-
// Calculate height based on properties and relationships
602-
const propsHeight = d.properties.length * 24
603-
const relationshipsHeight = d.relationships.length * 24 + 10
604-
return 60 + propsHeight + relationshipsHeight
601+
// Calculate height based on properties and relationships with reduced height
602+
const propsHeight = d.properties.length * 22 // Reduced from 24
603+
const relationshipsHeight = d.relationships.length > 0 ? (d.relationships.length * 22 + 20) : 0 // Reduced from 24
604+
return 50 + propsHeight + relationshipsHeight // Reduced from 60
605605
})
606606
.attr('rx', 8)
607607
.attr('ry', 8)
@@ -618,23 +618,23 @@ const createDiagram = () => {
618618
// Header background
619619
header.append('rect')
620620
.attr('width', cardWidth)
621-
.attr('height', 40)
621+
.attr('height', 36) // Reduced from 40
622622
.attr('rx', 8)
623623
.attr('ry', 8)
624624
.attr('fill', '#1E293B')
625625
626626
// Emoji
627627
header.append('text')
628628
.attr('x', 20)
629-
.attr('y', 25)
629+
.attr('y', 22) // Adjusted from 25
630630
.attr('dominant-baseline', 'middle')
631-
.attr('font-size', '20px')
631+
.attr('font-size', '18px') // Reduced from 20px
632632
.text(d.emoji)
633633
634634
// Model name
635635
header.append('text')
636636
.attr('x', 50)
637-
.attr('y', 25)
637+
.attr('y', 22) // Adjusted from 25
638638
.attr('dominant-baseline', 'middle')
639639
.attr('fill', '#E5E7EB')
640640
.attr('font-weight', 'bold')
@@ -647,11 +647,11 @@ const createDiagram = () => {
647647
648648
// Properties container
649649
const propertiesGroup = g.append('g')
650-
.attr('transform', 'translate(0, 40)')
650+
.attr('transform', 'translate(0, 36)') // Reduced from 40
651651
652652
// Add properties
653653
d.properties.forEach((prop, i) => {
654-
const y = 20 + i * 24
654+
const y = 18 + i * 22 // Reduced from 20 and 24
655655
const row = propertiesGroup.append('g')
656656
.attr('transform', `translate(0, ${y})`)
657657
@@ -696,7 +696,7 @@ const createDiagram = () => {
696696
697697
// Add relationships section if there are any
698698
if (d.relationships.length > 0) {
699-
const relationshipsY = 40 + d.properties.length * 24
699+
const relationshipsY = 36 + d.properties.length * 22 // Adjusted from 40 and 24
700700
701701
// Add relationship divider line
702702
g.append('line')
@@ -714,7 +714,7 @@ const createDiagram = () => {
714714
715715
// Add each relationship on its own row
716716
d.relationships.forEach((rel, i) => {
717-
const y = 20 + i * 24
717+
const y = 18 + i * 22 // Reduced from 20 and 24
718718
const row = relationshipsGroup.append('g')
719719
.attr('transform', `translate(0, ${y})`)
720720
@@ -805,15 +805,15 @@ const createDiagram = () => {
805805
806806
// Add a legend for relationship types with improved visibility
807807
const legend = svg.append('g')
808-
.attr('transform', `translate(${width - 220}, 40)`) // Moved down to center vertically
808+
.attr('transform', `translate(${width - 220}, 50)`) // Moved down more to center vertically
809809
.attr('class', 'legend')
810810
811811
// Add legend background for better visibility
812812
legend.append('rect')
813813
.attr('x', -10)
814814
.attr('y', -10)
815815
.attr('width', 220)
816-
.attr('height', 130)
816+
.attr('height', 120) // Reduced height to balance spacing
817817
.attr('rx', 8)
818818
.attr('ry', 8)
819819
.attr('fill', 'rgba(30, 41, 59, 0.8)') // Dark background with transparency

0 commit comments

Comments
 (0)