|
|
@ -214,9 +214,7 @@ Core.prototype.setOptions = function (options) { |
|
|
|
} |
|
|
|
|
|
|
|
// propagate options to all components
|
|
|
|
this.components.forEach(function (component) { |
|
|
|
component.setOptions(options); |
|
|
|
}); |
|
|
|
this.components.forEach(component => component.setOptions(options)); |
|
|
|
|
|
|
|
// TODO: remove deprecation error one day (deprecated since version 0.8.0)
|
|
|
|
if (options && options.order) { |
|
|
@ -270,9 +268,7 @@ Core.prototype.destroy = function () { |
|
|
|
this.hammer = null; |
|
|
|
|
|
|
|
// give all components the opportunity to cleanup
|
|
|
|
this.components.forEach(function (component) { |
|
|
|
component.destroy(); |
|
|
|
}); |
|
|
|
this.components.forEach(component => component.destroy()); |
|
|
|
|
|
|
|
this.body = null; |
|
|
|
}; |
|
|
@ -336,9 +332,7 @@ Core.prototype.clear = function(what) { |
|
|
|
|
|
|
|
// clear options of timeline and of each of the components
|
|
|
|
if (!what || what.options) { |
|
|
|
this.components.forEach(function (component) { |
|
|
|
component.setOptions(component.defaultOptions); |
|
|
|
}); |
|
|
|
this.components.forEach(component => component.setOptions(component.defaultOptions)); |
|
|
|
|
|
|
|
this.setOptions(this.defaultOptions); // this will also do a redraw
|
|
|
|
} |
|
|
|