From 183a0ffecb3c83b4c5e49681fdb67a30a307ad5b Mon Sep 17 00:00:00 2001 From: Amrit Date: Mon, 6 Jan 2025 10:32:28 +0530 Subject: [PATCH] todo: apply array destructuring --- js/blockfactory.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/js/blockfactory.js b/js/blockfactory.js index 653db1cc60..438404b93d 100644 --- a/js/blockfactory.js +++ b/js/blockfactory.js @@ -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; } /**