(iconStr, // Support 'image://' or 'path://' or direct svg path.
opt, rect)
| 14656 | } |
| 14657 | } |
| 14658 | function createIcon(iconStr, // Support 'image://' or 'path://' or direct svg path. |
| 14659 | opt, rect) { |
| 14660 | var innerOpts = extend({ |
| 14661 | rectHover: true |
| 14662 | }, opt); |
| 14663 | var style = innerOpts.style = { |
| 14664 | strokeNoScale: true |
| 14665 | }; |
| 14666 | rect = rect || { |
| 14667 | x: -1, |
| 14668 | y: -1, |
| 14669 | width: 2, |
| 14670 | height: 2 |
| 14671 | }; |
| 14672 | |
| 14673 | if (iconStr) { |
| 14674 | return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), defaults(style, rect), new ZRImage(innerOpts)) : makePath(iconStr.replace('path://', ''), innerOpts, rect, 'center'); |
| 14675 | } |
| 14676 | } |
| 14677 | /** |
| 14678 | * Return `true` if the given line (line `a`) and the given polygon |
| 14679 | * are intersect. |
no test coverage detected
searching dependent graphs…