From a68a72714129a870913d18dede72536c7fe5cbb6 Mon Sep 17 00:00:00 2001 From: spengjie Date: Mon, 4 Nov 2019 16:01:38 +0800 Subject: [PATCH] fix: graph.focusItem(item) not working if item is a string --- src/graph/controller/view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graph/controller/view.js b/src/graph/controller/view.js index d56b59ddf5..d4d21df54d 100644 --- a/src/graph/controller/view.js +++ b/src/graph/controller/view.js @@ -65,7 +65,7 @@ class View { } focus(item) { if (Util.isString(item)) { - item = this.graph.findById[item]; + item = this.graph.findById(item); } if (item) { const matrix = item.get('group').getMatrix();