Skip to content

Commit 3c69a87

Browse files
authored
todo: apply array destructuring (#4232)
* todo: apply array destructuring * enable backward compatibility
1 parent 3eeed25 commit 3c69a87

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

js/blockfactory.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,17 @@ class SVG {
187187

188188
/**
189189
* @public
190-
* @param {number} w
191-
* @param {number} h
192-
* @param {number} w2
193-
* @param {number} h2
190+
* @param {number} w - width
191+
* @param {number} h - height
192+
* @param {number} w2 - width2
193+
* @param {number} h2 - height2
194194
* @returns {void}
195195
*/
196196
setExpand(w, h, w2, h2) {
197-
// TODO: make this an array
198-
this._expandX = w;
199-
this._expandY = h;
200-
this._expandX2 = w2;
201-
this._expandY2 = h2;
197+
// Store expansion dimensions as array internally
198+
this._expandDimensions = [w, h, w2, h2];
199+
// Keep individual properties in sync for backward compatibility
200+
[this._expandX, this._expandY, this._expandX2, this._expandY2] = this._expandDimensions;
202201
}
203202

204203
/**

0 commit comments

Comments
 (0)