質問

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