Invalidating state laws that run afoul of the US Constitution (what’s ir actually says, not some imagined interpretation) is not judicial legislation. It’s what the courts are actually supposed to do.
That’s the puzzler on this ruling. If something is a constitutional right, then it cannot be abridged by the states.
The abortion crowd use that argument (successfully in most courts) all the time since Roe v. Wade essentially established abortion as a constitutional right.
Pretending that the 2nd Amendment was a restriction on the states