You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/10/04 09:08:24 UTC

[echarts] branch svg-ssr updated: wip(ssr): fix tooltip when no dom given in ssr mode

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch svg-ssr
in repository https://gitbox.apache.org/repos/asf/echarts.git


The following commit(s) were added to refs/heads/svg-ssr by this push:
     new f8a0090  wip(ssr): fix tooltip when no dom given in ssr mode
f8a0090 is described below

commit f8a0090e2f1d082fea9c1925ecc8ac217a8d5e0c
Author: pissang <bm...@gmail.com>
AuthorDate: Mon Oct 4 17:07:21 2021 +0800

    wip(ssr): fix tooltip when no dom given in ssr mode
---
 src/component/tooltip/TooltipView.ts | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/component/tooltip/TooltipView.ts b/src/component/tooltip/TooltipView.ts
index e83ca60..1523a18 100644
--- a/src/component/tooltip/TooltipView.ts
+++ b/src/component/tooltip/TooltipView.ts
@@ -171,7 +171,7 @@ class TooltipView extends ComponentView {
     private _updatePosition: ReturnType<typeof throttle> | TooltipView['_doUpdatePosition'];
 
     init(ecModel: GlobalModel, api: ExtensionAPI) {
-        if (env.node) {
+        if (env.node || !api.getDom()) {
             return;
         }
 
@@ -191,7 +191,7 @@ class TooltipView extends ComponentView {
         ecModel: GlobalModel,
         api: ExtensionAPI
     ) {
-        if (env.node) {
+        if (env.node || !api.getDom()) {
             return;
         }
 
@@ -301,7 +301,7 @@ class TooltipView extends ComponentView {
         api: ExtensionAPI,
         payload: ShowTipPayload
     ) {
-        if (payload.from === this.uid || env.node) {
+        if (payload.from === this.uid || env.node || !api.getDom()) {
             return;
         }
 
@@ -1013,7 +1013,7 @@ class TooltipView extends ComponentView {
     }
 
     dispose(ecModel: GlobalModel, api: ExtensionAPI) {
-        if (env.node) {
+        if (env.node || !api.getDom()) {
             return;
         }
         this._tooltipContent.dispose();

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org