Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md-icon #281

Merged
merged 45 commits into from
Apr 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
62e82fe
Start of md-icon directive and service.
Mar 23, 2016
8a188e4
Return SVG element instead of string, set default styles.
Mar 23, 2016
8b6f5ff
API and caching cleanup.
Mar 24, 2016
9518ca2
var->const
Mar 24, 2016
ec761da
Make MdIconProvider available at top level so it's shared by all comp…
Mar 24, 2016
776b755
Icon set support.
Mar 24, 2016
d88144e
Font support, various refactorings.
dozingcat Mar 27, 2016
159d53d
Merge remote-tracking branch 'origin/master' into mdicon
Mar 28, 2016
e423582
Rename directive bindings.
Mar 29, 2016
3ce1334
Merge branch 'master' into mdicon
dozingcat Apr 3, 2016
22a92e1
test
dozingcat Apr 3, 2016
0e6f396
Injecting test HTTP classes.
dozingcat Apr 4, 2016
014be77
start of tests
dozingcat Apr 4, 2016
ea3beea
HTTP tests.
dozingcat Apr 5, 2016
72d167f
Improved change detection and added more tests.
dozingcat Apr 7, 2016
53aeed2
Icon namespaces, addIcon and addIconSet are now additive.
dozingcat Apr 8, 2016
7390015
cleanup
Apr 8, 2016
86d86aa
Merge branch 'master' into mdicon
Apr 8, 2016
17f40c5
fix tests
Apr 8, 2016
87dd4ac
Remove local changes.
Apr 8, 2016
82bd25e
remove unused entry
Apr 8, 2016
e4d568f
more tests
dozingcat Apr 10, 2016
af2f94b
MdIconProvider->MdIconRegistry
dozingcat Apr 10, 2016
154b5e0
Fix bug copying icons out of icon sets, and use Observable.share() co…
dozingcat Apr 13, 2016
cef1277
Remove unused imports.
dozingcat Apr 13, 2016
30f8cce
Remove unnecessary cloneNode.
dozingcat Apr 14, 2016
73a9a3f
Remove custom viewBox size.
Apr 15, 2016
03bcbed
Merge remote-tracking branch 'upstream/master' into mdicon
Apr 15, 2016
e87af2e
Updated for PR comments.
dozingcat Apr 18, 2016
062307e
formatting fixes
dozingcat Apr 18, 2016
d3682b7
Fix tslint errors.
dozingcat Apr 18, 2016
8e2ff62
Factor out common test assertions, and add tests for <svg> elements i…
dozingcat Apr 18, 2016
4b02d27
Fix tests for Edge and IE11 (element.children bad, element.childNodes…
dozingcat Apr 19, 2016
195acd3
Merge remote-tracking branch 'upstream/master' into mdicon
dozingcat Apr 19, 2016
6391cdb
Merge remote-tracking branch 'upstream/master' into mdicon
Apr 19, 2016
437ab0c
In-progress updates for PR comments.
Apr 19, 2016
364391a
More PR comments.
Apr 19, 2016
6dc1af2
Remove Renderer.detachView call since it doesn't work in IE11.
dozingcat Apr 20, 2016
796d37f
comments
dozingcat Apr 20, 2016
a4ea23e
Move test SVGs to separate file.
dozingcat Apr 20, 2016
df6415b
Use <md-icon> for menu icon.
Apr 20, 2016
04b23fa
Use watched:false in karma.config.ts.
Apr 20, 2016
37d8362
Merge remote-tracking branch 'upstream/master' into mdicon
Apr 22, 2016
6927d52
Merge remote-tracking branch 'upstream/master' into mdicon
Apr 22, 2016
08e8cbd
PR comments for test component bindings and demo styles.
dozingcat Apr 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions src/components/icon/fake-svgs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import {
Response,
ResponseOptions} from 'angular2/http';

/**
* Fake URLs and associated SVG documents used by tests.
*/
const FAKE_SVGS = (() => {
const svgs = new Map<string, string>();
svgs.set('cat.svg',
'<svg><path id="meow"></path></svg>');

svgs.set('dog.svg',
'<svg><path id="woof"></path></svg>');

svgs.set('farm-set-1.svg', `
<svg>
<defs>
<g id="pig"><path id="oink"></path></g>
<g id="cow"><path id="moo"></path></g>
</defs>
</svg>
`);

svgs.set('farm-set-2.svg', `
<svg>
<defs>
<g id="cow"><path id="moo moo"></path></g>
<g id="sheep"><path id="baa"></path></g>
</defs>
</svg>
`);

svgs.set('arrow-set.svg', `
<svg>
<defs>
<svg id="left-arrow"><path id="left"></path></svg>
<svg id="right-arrow"><path id="right"></path></svg>
</defs>
</svg>
`);

return svgs;
})();

/**
* Returns an HTTP response for a fake SVG URL.
*/
export function getFakeSvgHttpResponse(url: string) {
if (FAKE_SVGS.has(url)) {
return new Response(new ResponseOptions({
status: 200,
body: FAKE_SVGS.get(url),
}));
} else {
return new Response(new ResponseOptions({status: 404}));
}
}
Loading