5757 function process_{jsDivId}() {{
5858 function drawPlot(Core) {{
5959 Core.settings.HandleKeys = false;
60- const obj = Core.parse({jsonContent});
61- Core.draw("{jsDivId}", obj, "{jsDrawOptions}");
60+ Core.unzipJSON({jsonLength},'{jsonZip}').then(json => {{
61+ const obj = Core.parse(json);
62+ Core.draw('{jsDivId}', obj, '{jsDrawOptions}');
63+ }});
6264 }}
63- const servers = ['/static/', 'https://root.cern/js/7.9.1/ ', 'https://jsroot.gsi.de/7.9.1 /'],
65+ const servers = ['/static/', 'https://jsroot.gsi.de/dev/ ', 'https://root.cern/js/dev /'],
6466 path = 'build/jsroot';
6567 if (typeof JSROOT !== 'undefined')
6668 drawPlot(JSROOT);
@@ -586,6 +588,7 @@ def _getJsCode(self):
586588
587589 width = _jsCanvasWidth
588590 height = _jsCanvasHeight
591+ jsonzip = ROOT .TBufferJSON .zipJSON (json )
589592 options = "all"
590593
591594 if self .isCanvas :
@@ -603,7 +606,7 @@ def _getJsCode(self):
603606 options = ""
604607
605608 thisJsCode = _jsCode .format (
606- jsCanvasWidth = width , jsCanvasHeight = height , jsonContent = json , jsDrawOptions = options , jsDivId = divId
609+ jsCanvasWidth = width , jsCanvasHeight = height , jsonLength = len ( json ), jsonZip = jsonzip , jsDrawOptions = options , jsDivId = divId
607610 )
608611 return thisJsCode
609612
0 commit comments