Skip to content

Commit 443d541

Browse files
committed
enable backward compatibility
1 parent 183a0ff commit 443d541

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

js/blockfactory.js

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

188188
/**
189189
* @public
190-
* @param {[number, number, number, number]} dimensions
190+
* @param {number} w - width
191+
* @param {number} h - height
192+
* @param {number} w2 - width2
193+
* @param {number} h2 - height2
191194
* @returns {void}
192195
*/
193-
setExpand(dimensions) {
194-
// Store expansion dimensions as array [w, h, w2, h2]
195-
[this._expandX, this._expandY, this._expandX2, this._expandY2] = dimensions;
196+
setExpand(w, h, w2, 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;
196201
}
197202

198203
/**

0 commit comments

Comments
 (0)