문제

I have got this:

 1| var seglist = path.pathSegList, list = [], 
 2|     x, y, ix, iy, item, nItem;
 3|
 4| for (var i = 0, n = seglist.numberOfItems; i < n; i++) {
 5|   item = seglist.getItem(i);
 6|   if (item instanceof SVGPathSegMovetoAbs) {
 7|    .
 8|   }
 9|   .
10|   .
11| }

and line 6 throws this error:

Unhandled Error: Undefined variable: SVGPathSegMovetoAbs

why?

도움이 되었습니까?

해결책

Not all SVG DOM interfaces were fully exposed in Opera(Presto).

item instanceof SVGPathSeg

returns true however. If you want to check what type of segment you get, why not use the pathSegType or pathSegTypeAsLetter attributes on SVGPathSeg instead?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top