Jump to content
Search Community

DrawSVG doesn't work when using a mask in Edge

BGDDT test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

See pen - I am using a mask to create the effect that looks like I have cut a hole with a path shape in the blue box to show grey background behind it. I am then using DrawSVG to animate this. All is working fine except on Edge browser. If you comment out the opening and closing mask tag then the DrawSVG animation works fine in Edge. Has anyone come across this issue before when using masks?

 

Thanks!

See the Pen BGYgLQ by anon (@anon) on CodePen

Link to comment
Share on other sites

Hi @merchantcantos :)

 

Welcome to the forum.

 

Edge is super duper fussy when it comes to masks. (& many other things) The main thing to try with Edge when you have a drawSVG mask is to add a tiny rotation that will force Edge to draw it correctly. I wrote about that here.

 

Edge also doesn't like when you group things in a mask element. Another thing I always recommend is to mask a group rather than an individual element. Even if you only have one shape, I still recommend grouping it and masking the group. Here's a fork of your pen with those changes. It seems to be working correctly in Edge for me.

 

See the Pen Oavzbz by PointC (@PointC) on CodePen

Hopefully that helps. Happy tweening and welcome aboard.

:)

 

  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...