Skip to content

Commit

Permalink
todo: apply array destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
retrogtx committed Jan 6, 2025
1 parent b020cb8 commit 183a0ff
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions js/blockfactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,12 @@ class SVG {

/**
* @public
* @param {number} w
* @param {number} h
* @param {number} w2
* @param {number} h2
* @param {[number, number, number, number]} dimensions
* @returns {void}
*/
setExpand(w, h, w2, h2) {
// TODO: make this an array
this._expandX = w;
this._expandY = h;
this._expandX2 = w2;
this._expandY2 = h2;
setExpand(dimensions) {
// Store expansion dimensions as array [w, h, w2, h2]
[this._expandX, this._expandY, this._expandX2, this._expandY2] = dimensions;
}

/**
Expand Down

0 comments on commit 183a0ff

Please sign in to comment.