vueuse / motion

๐Ÿคน Vue Composables putting your components in motion
https://motion.vueuse.org
MIT License
2.37k stars 82 forks source link

feat: support SVGPath #243

Open imfenghuang opened 13 hours ago

imfenghuang commented 13 hours ago

๐Ÿ”— Linked issue

241

โ“ Type of change

๐Ÿ“š Description

SVGPath related properties are not processed originally

  1. MotionProperties is defined includes SVGPathProperties, but does not process
  2. style supports process pathLength, pathSpacing, pathOffset
  3. pathLength always normalize to 1
  4. pathLength and pathSpacing to stroke-dasharray. stroke-dasharray = pathLength pathSpacing 4.1 stroke-dasharray = pathLength pathSpacing. this support process dashes and gaps are two or same size, can't process that dashes and gaps of various sizes with an odd number of values, like 4,1,2 which is equivalent to [4,1,2,4,1,2]
  5. pathOffset to stroke-dashoffset
  6. tests and demo added

๐Ÿ“ Checklist