Skip to content

Commit

Permalink
fix gap calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchox5 committed Dec 24, 2024
1 parent 27b346c commit e69b4a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/orbit-arc.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ export class OrbitArc extends HTMLElement {
const orbitRadius = parseFloat(
getComputedStyle(this).getPropertyValue('r') || 0
)
const gap = parseFloat(
const rawGap = parseFloat(
getComputedStyle(this).getPropertyValue('--o-gap') || 0.001
)

const gap = rawGap <= 0 ? 0.001 : rawGap / 2

const shape = this.getAttribute('shape') || 'none'
const flip = this.hasAttribute('flip') || this.classList.contains('flip')
const fitRange =
Expand Down

0 comments on commit e69b4a7

Please sign in to comment.