Skip to content

Commit

Permalink
Remove obsolete params
Browse files Browse the repository at this point in the history
  • Loading branch information
otacke committed Nov 28, 2024
1 parent 2477ec7 commit b074caf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/scripts/components/canvas/canvas-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ export default class CanvasElement {
/**
* @class
* @param {object} [params] Parameters passed by the editor.
* @param {object} [callbacks] Callbacks.
*/
constructor(params = {}, callbacks = {}) {
constructor(params = {}) {
this.params = Util.extend({}, params);

this.dom = document.createElement('div');
Expand Down
5 changes: 1 addition & 4 deletions src/scripts/components/canvas/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ export default class Canvas {
/**
* @class
* @param {object} [params] Parameters passed by the editor.
* @param {object} [callbacks] Callbacks.
*/
constructor(params = {}, callbacks = {}) {
constructor(params = {}) {
params = Util.extend({
elements: [],
}, params);

callbacks = Util.extend({}, callbacks);

this.dom = document.createElement('div');
this.dom.classList.add('h5p-animator-canvas');
this.dom.style.setProperty('--aspect-ratio', params.aspectRatio ?? '16/9');
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ export default class AnimatorMain {
backgroundImage: this.params.backgroundImage,
globals: this.params.globals,
elements: this.params.elements
},
{}
}
);

const elementsLookup = this.canvas.elements.reduce((acc, element) => {
Expand Down

0 comments on commit b074caf

Please sign in to comment.