anime icon indicating copy to clipboard operation
anime copied to clipboard

Add valid svg attributes and allow empty attributes

Open ph1p opened this issue 6 years ago • 0 comments

This PR adds a list of all valid SVG Attributes (https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute) and allows us to set own attributtes with JavaScript e. g. for initialisation.

Now

<svg>
  <path class="target" d=""> <!-- Can't do that. We have to write at least one char: ' ... d=" " ...' -->
</svg>

With this PR

<svg>
  <path class="target">
</svg>

JavaScript

// we can set our values to initialize our svg
anime.set('.target', {
  d: 'M50 ...'
});

ph1p avatar Feb 06 '19 16:02 ph1p