@@ -12,7 +12,7 @@ const version_id = 'dev',
1212
1313/** @summary version date
1414 * @desc Release date in format day/month/year like '14/04/2022' */
15- version_date = '22 /09/2025',
15+ version_date = '23 /09/2025',
1616
1717/** @summary version id and date
1818 * @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -9232,6 +9232,14 @@ class BasePainter {
92329232
92339233 rect.changed = false;
92349234
9235+ if (!rect.width && !rect.height && !main.empty() && main.attr('style')) {
9236+ const ws = main.style('width'), hs = main.style('height');
9237+ if (isStr(ws) && isStr(hs) && ws.match(/^\d+px$/) && hs.match(/^\d+px$/)) {
9238+ rect.width = parseInt(ws.slice(0, ws.length-2));
9239+ rect.height = parseInt(hs.slice(0, hs.length-2));
9240+ }
9241+ }
9242+
92359243 if (old_h && old_w && (old_h > 0) && (old_w > 0)) {
92369244 if ((old_h !== rect.height) || (old_w !== rect.width))
92379245 rect.changed = (check_level > 1) || (rect.width / old_w < 0.99) || (rect.width / old_w > 1.01) || (rect.height / old_h < 0.99) || (rect.height / old_h > 1.01);
@@ -86871,7 +86879,7 @@ class TPadPainter extends ObjectPainter {
8687186879 this.createAttFill({ attr: this.#pad });
8687286880
8687386881 if ((rect.width <= lmt) || (rect.height <= lmt)) {
86874- if (this.hasSnapId ()) {
86882+ if (this.getSnapId ()) {
8687586883 svg.style('display', 'none');
8687686884 console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
8687786885 }
@@ -181263,7 +181271,7 @@ class RPadPainter extends RObjectPainter {
181263181271 this.createAttFill({ pattern: 1001, color: 0 });
181264181272
181265181273 if ((rect.width <= lmt) || (rect.height <= lmt)) {
181266- if (! this.hasSnapId ()) {
181274+ if (this.getSnapId ()) {
181267181275 svg.style('display', 'none');
181268181276 console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
181269181277 }
0 commit comments