@@ -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 = '23 /09/2025',
15
+ version_date = '24 /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}
@@ -86879,7 +86879,7 @@ class TPadPainter extends ObjectPainter {
86879
86879
this.createAttFill({ attr: this.#pad });
86880
86880
86881
86881
if ((rect.width <= lmt) || (rect.height <= lmt)) {
86882
- if (this.getSnapId ()) {
86882
+ if (! this.hasSnapId ()) {
86883
86883
svg.style('display', 'none');
86884
86884
console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
86885
86885
}
@@ -122563,6 +122563,27 @@ function openFile(arg, opts) {
122563
122563
return file._open();
122564
122564
}
122565
122565
122566
+ /** @summary Unzip JSON string
122567
+ * @desc Should be used for buffer produced with TBufferJSON::zipJSON() method
122568
+ * @param tgtsize - original length of json string
122569
+ * @param src - string with data returned by TBufferJSON::zipJSON
122570
+ * @return {Promise} with unzipped string */
122571
+
122572
+ async function unzipJSON(tgtsize, src) {
122573
+ const bindata = atob_func(src),
122574
+ buf = new ArrayBuffer(bindata.length),
122575
+ bufView = new DataView(buf);
122576
+ for (let i = 0; i < bindata.length; i++)
122577
+ bufView.setUint8(i, bindata.charCodeAt(i));
122578
+
122579
+ return R__unzip(bufView, tgtsize).then(resView => {
122580
+ let resstr = '';
122581
+ for (let i = 0; i < tgtsize; i++)
122582
+ resstr += String.fromCharCode(resView.getUint8(i));
122583
+ return resstr;
122584
+ });
122585
+ }
122586
+
122566
122587
// special way to assign methods when streaming objects
122567
122588
addClassMethods(clTNamed, CustomStreamers[clTNamed]);
122568
122589
addClassMethods(clTObjString, CustomStreamers[clTObjString]);
@@ -181271,7 +181292,7 @@ class RPadPainter extends RObjectPainter {
181271
181292
this.createAttFill({ pattern: 1001, color: 0 });
181272
181293
181273
181294
if ((rect.width <= lmt) || (rect.height <= lmt)) {
181274
- if (this.getSnapId ()) {
181295
+ if (! this.hasSnapId ()) {
181275
181296
svg.style('display', 'none');
181276
181297
console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
181277
181298
}
@@ -184328,6 +184349,7 @@ exports.svgToImage = svgToImage;
184328
184349
exports.toJSON = toJSON;
184329
184350
exports.treeDraw = treeDraw;
184330
184351
exports.treeProcess = treeProcess;
184352
+ exports.unzipJSON = unzipJSON;
184331
184353
exports.urlClassPrefix = urlClassPrefix;
184332
184354
exports.version = version;
184333
184355
exports.version_date = version_date;
0 commit comments