Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

fix issue with clip-path in fractions material in older versions of safari #45

Merged
merged 3 commits into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/fractions/Slice.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

<Draggable {...$$restProps}
class="fraction-slice fraction-size"
style="clip-path: {pathId}; --webkit-clip-path: {pathId}"
style="clip-path: {pathId}; -webkit-clip-path: {pathId}"
on:moved
on:wheel={rotate}>
<svg viewBox="0 0 1 1.01">
Expand Down
4 changes: 3 additions & 1 deletion src/components/fractions/SpawnSlice.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<style>
div {
touch-action: none;
position: absolute;
}
svg { position: absolute; z-index: -99999999999; }
Expand All @@ -44,6 +45,7 @@
</svg>
{/if}

<div on:mousedown={spawn} on:touchstart={spawn} {...$$restProps} bind:this={element} style="clip-path: url(#{svgId})" class="fraction-size">
<div on:mousedown={spawn} on:touchstart={spawn} {...$$restProps} bind:this={element}
style="-webkit-clip-path: url(#{svgId}); clip-path: url(#{svgId})" class="fraction-size">
<Slice fraction={fraction} offset={offset} disabled={true} svgId={svgId} />
</div>