When adding a new widget with _addwidget, the old CSS injected in the head isn't removed. This results in dupilcate CSS for every added widget.
See screenshot: I added three widgets with _addwdiget. This results in four style tags (one on init, the other three after adding a widget), with only the last one containing all the updated styles. The previous three are irrelevant:
This can easily be fixed by adding
this.remove_style_tag();
to the function _add_styletag.
I believe this might also fix some performance issues with _addwidget.
When adding a new widget with _addwidget, the old CSS injected in the
head
isn't removed. This results in dupilcate CSS for every added widget.See screenshot: I added three widgets with _addwdiget. This results in four
style
tags (one on init, the other three after adding a widget), with only the last one containing all the updated styles. The previous three are irrelevant:This can easily be fixed by adding
this.remove_style_tag();
to the function _add_styletag.
I believe this might also fix some performance issues with _addwidget.
Related to this fix: https://github.com/ducksboard/gridster.js/pull/77#issuecomment-13882888