mat-icon has display issues when inlining multiple copies of the same SVG with defs with IDs
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
#### Bug, feature request, or proposal:
Proposal: Extend the cloneSvg function in src/lib/icon/icon-registry.ts to accommodate munging IDs in defs so that multiple copies of the same inlined SVG won't have conflicting IDs.
#### What is the expected behavior?
When two copies of an SVG with a linearGradient def (identified by an ID) are inlined, both copies of the SVG should display the linear gradient.
#### What is the current behavior?
Only the first copy of the SVG displays the linear gradient. All other copies do not, because the IDs in the defs are duplicated in the other copies.
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.1.2, Angular Material 5.0.2 (although the issue still exists in 5.1.0), TypeScript 2.6.2. Tested in Win10 in Chrome Version 63.0.3239.132 (Official Build) (64-bit).
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu trong src/lib/icon/icon-registry.ts tại cloneSvg và kiểm tra cách các defs SVG cùng các ID của chúng được sao chép. Tái hiện sự cố với hai bản sao được chèn nội tuyến có chứa một linearGradient, sau đó xác minh rằng mỗi bản sao hiển thị gradient của nó mà không có xung đột ID.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100