You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But one should be aware of [Same-origin policy](https://en.wikipedia.org/wiki/Same-origin_policy), when the browser blocks requests to files from domains other than current web page.
428
+
But one should be aware of [Same-origin policy](https://en.wikipedia.org/wiki/Same-origin_policy),
429
+
when the browser blocks requests to files from domains other than current web page.
429
430
To enable CORS on Apache web server, hosting ROOT files, one should add following lines to `.htaccess` file:
430
431
431
432
<IfModule mod_headers.c>
@@ -474,7 +475,7 @@ For debuging purposes one can install JSROOT on local file system and let read R
But this worked only with earlier Firefox versions.
478
479
479
480
480
481
@@ -587,7 +588,7 @@ to change stat format using to display value in stats box:
587
588
JSROOT.gStyle.fStatFormat = "7.5g"
588
589
589
590
There is also `JSROOT.settings` object which contains all other JSROOT settings. For instance,
590
-
one can configure custom values format for different axes:
591
+
one can configure custom format for different axes:
591
592
592
593
JSROOT.settings.XValuesFormat = "4.2g"
593
594
JSROOT.settings.YValuesFormat = "6.1f"
@@ -606,8 +607,8 @@ Such JSON representation generated using the [TBufferJSON](https://root.cern/doc
606
607
obj->SaveAs("file.json");
607
608
...
608
609
609
-
To access data from a remote web server, it is recommended to use the [XMLHttpRequest](http://en.wikipedia.org/wiki/XMLHttpRequest) class. JSROOT provides a special method to create such object and properly handle it in different browsers.
610
-
For receiving JSON from a server one could use following code:
610
+
To access data from a remote web server, it is recommended to use the `JSROOT.httpRequest`method.
611
+
For instance to recieve object from a THttpServer server one could do:
console.log('Read object of type ', obj._typename);
@@ -637,10 +638,9 @@ The first argument is the id of the HTML div element, where drawing will be perf
637
638
638
639
Here is complete [running example](https://root.cern/js/latest/api.htm#custom_html_read_json) ans [source code](https://github.com/root-project/jsroot/blob/master/demo/read_json.htm):
639
640
640
-
var filename = "https://root.cern/js/files/th2ul.json.gz";
In very seldom cases one need to access painter object, created in JSROOT.draw() function. This can be done via
646
646
handling Promise results like:
@@ -748,7 +748,7 @@ will be called.
748
748
749
749
As second parameter of tree.Process() function one could provide object with arguments
750
750
751
-
var args = { numentries: 1000, firstentry: 500 };
751
+
let args = { numentries: 1000, firstentry: 500 };
752
752
tree.Process(selector, args);
753
753
754
754
@@ -759,8 +759,8 @@ Any supported TGeo object can be drawn with normal JSROOR.draw() function.
759
759
If necessary, one can create three.js model for supported object directly and use such model
760
760
separately. This can be done with the function:
761
761
762
-
var opt = { numfaces: 100000 };
763
-
var obj3d = JSROOT.GEO.build(obj, opt);
762
+
let opt = { numfaces: 100000 };
763
+
let obj3d = JSROOT.GEO.build(obj, opt);
764
764
scene.add( obj3d );
765
765
766
766
Following options can be specified:
@@ -819,14 +819,9 @@ Such JSON string could be parsed by any other JSROOT-based application.
819
819
820
820
[OpenUI5](http://openui5.org/) is a web toolkit for developers to ease and speed up the development of full-blown HTML5 web applications. Since version 5.3.0 JSROOT provides possibility to use OpenUI5 functionality together with JSROOT.
821
821
822
-
First problem is bootstraping of OpenUI5. Most easy solution - specify openui5 URL parameter when loading JSROOT:
JSROOT uses https://openui5.hana.ondemand.com to load latest stable version of OpenUI5. After loading is completed, one can use `sap` to access openui5 functionality. Like:
822
+
First problem is bootstraping of OpenUI5. Most easy solution - use `JSROOT.require('openui5')`.
823
+
JSROOT uses https://openui5.hana.ondemand.com to load latest stable version of OpenUI5.
824
+
After loading is completed, one can use `sap` to access openui5 functionality like:
830
825
831
826
<script type="text/javascript">
832
827
JSROOT.require('openui5').then(() => {
@@ -842,7 +837,7 @@ JSROOT uses https://openui5.hana.ondemand.com to load latest stable version of O
842
837
})
843
838
]
844
839
}).placeAt("content");
845
-
}
840
+
});
846
841
</script>
847
842
848
843
There are small details when using OpenUI5 with THttpServer. First of all, location of JSROOT scripts should be specified
@@ -856,7 +851,7 @@ JSROOT provides [example](https://root.cern/js/latest/demo/openui5/) showing usa
856
851
857
852
### Migration v5 -> v6
858
853
859
-
In JSROOT v6 release some many incompatible changes where done.
854
+
In JSROOT v6 release some many incompatible changes were done.
860
855
861
856
Main script was renamed to `JSRoot.core.js`. Old `JSRootCore.js` script left to provide partial compatibility
862
857
with old applications, but will be removed in future JSROOT v6.2. All URL parameters for main script will be
@@ -875,7 +870,7 @@ Painter classes were renamed and made public:
0 commit comments