@@ -12,7 +12,7 @@ const version_id = 'dev',
12
12
13
13
/** @summary version date
14
14
* @desc Release date in format day/month/year like '14/04/2022' */
15
- version_date = '22 /09/2025',
15
+ version_date = '23 /09/2025',
16
16
17
17
/** @summary version id and date
18
18
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -9232,6 +9232,14 @@ class BasePainter {
9232
9232
9233
9233
rect.changed = false;
9234
9234
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
+
9235
9243
if (old_h && old_w && (old_h > 0) && (old_w > 0)) {
9236
9244
if ((old_h !== rect.height) || (old_w !== rect.width))
9237
9245
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 {
86871
86879
this.createAttFill({ attr: this.#pad });
86872
86880
86873
86881
if ((rect.width <= lmt) || (rect.height <= lmt)) {
86874
- if (this.hasSnapId ()) {
86882
+ if (this.getSnapId ()) {
86875
86883
svg.style('display', 'none');
86876
86884
console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
86877
86885
}
@@ -181263,7 +181271,7 @@ class RPadPainter extends RObjectPainter {
181263
181271
this.createAttFill({ pattern: 1001, color: 0 });
181264
181272
181265
181273
if ((rect.width <= lmt) || (rect.height <= lmt)) {
181266
- if (! this.hasSnapId ()) {
181274
+ if (this.getSnapId ()) {
181267
181275
svg.style('display', 'none');
181268
181276
console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
181269
181277
}
0 commit comments