minor #33587 [WebProfilerBundle] Clean time.js (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Clean time.js

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

The `classnames` property was removed in https://github.com/symfony/symfony/pull/33535.

Commits
-------

997ca70385 [WebProfilerBundle] Clean time.js
This commit is contained in:
Fabien Potencier 2019-09-16 10:31:03 +02:00
commit 9a019d7201

View File

@ -223,7 +223,7 @@ class Legend {
this.createCategory = this.createCategory.bind(this);
this.categories = [];
this.theme.getDefaultCategories().forEach(this.createCategory)
this.theme.getDefaultCategories().forEach(this.createCategory);
}
add(category) {
@ -260,23 +260,6 @@ class Legend {
return this.categories.find(element => element.value === category) || this.createCategory(category);
}
getClassname(category) {
return this.classnames[category] || '';
}
getSectionClassname() {
return this.classnames.section;
}
getDefaultClassname() {
return this.classnames.default;
}
getStandardClassenames() {
return Array.from(Object.values(this.classnames))
.filter(className => className !== this.getSectionClassname());
}
emit(name) {
this.element.dispatchEvent(new Event(name));
}