@@ -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 = '23 /09/2025',
15+ version_date = '24 /09/2025',
1616
1717/** @summary version id and date
1818 * @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -86879,7 +86879,7 @@ class TPadPainter extends ObjectPainter {
8687986879 this.createAttFill({ attr: this.#pad });
8688086880
8688186881 if ((rect.width <= lmt) || (rect.height <= lmt)) {
86882- if (this.getSnapId ()) {
86882+ if (! this.hasSnapId ()) {
8688386883 svg.style('display', 'none');
8688486884 console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
8688586885 }
@@ -122563,6 +122563,27 @@ function openFile(arg, opts) {
122563122563 return file._open();
122564122564}
122565122565
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+
122566122587// special way to assign methods when streaming objects
122567122588addClassMethods(clTNamed, CustomStreamers[clTNamed]);
122568122589addClassMethods(clTObjString, CustomStreamers[clTObjString]);
@@ -181271,7 +181292,7 @@ class RPadPainter extends RObjectPainter {
181271181292 this.createAttFill({ pattern: 1001, color: 0 });
181272181293
181273181294 if ((rect.width <= lmt) || (rect.height <= lmt)) {
181274- if (this.getSnapId ()) {
181295+ if (! this.hasSnapId ()) {
181275181296 svg.style('display', 'none');
181276181297 console.warn(`Hide canvas while geometry too small w=${rect.width} h=${rect.height}`);
181277181298 }
@@ -184328,6 +184349,7 @@ exports.svgToImage = svgToImage;
184328184349exports.toJSON = toJSON;
184329184350exports.treeDraw = treeDraw;
184330184351exports.treeProcess = treeProcess;
184352+ exports.unzipJSON = unzipJSON;
184331184353exports.urlClassPrefix = urlClassPrefix;
184332184354exports.version = version;
184333184355exports.version_date = version_date;
0 commit comments