Simplified component-creation, dropping IE8 compatibility.
This commit is contained in:
parent
6eface57ae
commit
6622db1b2c
5 changed files with 173 additions and 192 deletions
|
|
@ -280,10 +280,8 @@ DynMap.prototype = {
|
|||
me.selectMap(me.defaultworld.defaultmap);
|
||||
|
||||
$.each(me.options.components, function(index, configuration) {
|
||||
me.components.push(componentconstructors[configuration.type](me, configuration));
|
||||
});
|
||||
$.each(me.components, function(index, component) {
|
||||
component.initialize();
|
||||
var componentconstructor = componentconstructors[configuration.type];
|
||||
me.components.push(new componentconstructor(me, configuration));
|
||||
});
|
||||
|
||||
setTimeout(function() { me.update(); }, me.options.updaterate);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue