Skip to content

Commit

Permalink
add check safari shape support
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchox5 committed Dec 1, 2024
1 parent c6cfb3f commit 9c280ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/js/orbit-arc.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
const path = this.shadowRoot.querySelector('path');
const defs = this.shadowRoot.querySelector('defs');
if (shape === 'circle') path.setAttribute('stroke-linecap', 'round');
if (shape !== 'none' && shape !== 'circle') {
if (shape !== 'none' && shape !== 'circle' && CSS.supports('fill', 'context-stroke')) {
defs.innerHTML = ''; // Limpiar defs previos
defs.appendChild(this.createMarker('head', 'end'));
defs.appendChild(this.createMarker('tail', 'start'));
Expand Down
2 changes: 1 addition & 1 deletion src/js/orbit-progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class OrbitProgress extends HTMLElement {
arc.setAttribute('stroke', full ? progressBgColor : progressBarColor);
arc.setAttribute('fill', 'transparent');
if (shape === 'circle') arc.setAttribute('stroke-linecap', 'round');
if (shape !== 'none' && shape !== 'circle') {
if (shape !== 'none' && shape !== 'circle' && CSS.supports('fill', 'context-stroke')) {
arc.setAttribute('marker-end', 'url(#head)');
arc.setAttribute('marker-start', 'url(#tail)');
}
Expand Down

0 comments on commit 9c280ce

Please sign in to comment.