From 57744b0ffd4c63b6e3505aeac918cbaf7eede402 Mon Sep 17 00:00:00 2001 From: SeanLi Date: Fri, 9 Apr 2021 16:49:02 +0800 Subject: [PATCH] add flyTo to readme --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 5ee1084..53f41b4 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,26 @@ graphXR.injectionApiCommand(':getGraph', iframeElem) ``` +#### 2.5 flyTo + +``` +graphXR.injectionApiCommand(':getGraph', iframeElem) +.then((resData) => { + console.warn("Receive all data:", resData.content) + const {nodes, edges} = resData.content; + let flyToNode = nodes[0]; + if(!flyToNode){ + return + } + graphXR.injectionApiFunc( + "flyTo", + flyToNode._GXRID, + iframeElem + ); +}) + +``` + ### 3. event, only support ['change','select']