From a3dfd04ad670b425df4d36ff714a4d4e260ff5a9 Mon Sep 17 00:00:00 2001 From: Vincent Schippefilt Date: Wed, 6 Mar 2019 14:02:32 +0100 Subject: [REF] web_diagram: adapt code after jQuery update Part of task 1896658 Co-authored-by: Aaron Bohy Co-authored-by: Christophe Matthieu Co-authored-by: Mathieu Duckerts-Antoine Co-authored-by: David Monjoie Co-authored-by: Martin Geubelle Co-authored-by: svs-odoo Co-authored-by: Vincent Schippefilt --- addons/web_diagram/static/src/js/graph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'addons/web_diagram/static/src/js/graph.js') diff --git a/addons/web_diagram/static/src/js/graph.js b/addons/web_diagram/static/src/js/graph.js index 57eaff582ee..d7e54389340 100644 --- a/addons/web_diagram/static/src/js/graph.js +++ b/addons/web_diagram/static/src/js/graph.js @@ -87,11 +87,11 @@ dummy_circle.animate({'r': close_button_radius }, 400, 'linear'); if(entity_type == "node"){ - $.when(GraphNode.destruction_callback(entity)).done(function () { + Promise.resolve(GraphNode.destruction_callback(entity)).then(function () { entity.remove(); }); }else if(entity_type == "edge"){ - $.when(GraphEdge.destruction_callback(entity)).done(function () { + Promise.resolve(GraphEdge.destruction_callback(entity)).then(function () { entity.remove(); }); } -- cgit v1.2.3