antvis / util

utility library for AntV products.
MIT License
74 stars 28 forks source link

path-util 不支持 m 命令 #67

Closed xiaoiver closed 3 years ago

xiaoiver commented 3 years ago

路径中包含 m 命令时,转成绝对路径(path2Absolute)时会报错,例如下面的路径转绝对值时会得到一个错误的结果:

const path = [
      ['M', 120, 100],
      ['L', 200, 200],
      ['m', 120, 100],
      ['L', 200, 200],
];

const absolutePath = [
      ['M', 120, 100],
      ['L', 200, 200],
      ['M'], // 错误的 segment
      ['L', 200, 200],
];