Quand j'essaye mon code je marque donc dans la barre de recherche le nom de la box que je cherche sauf qu'au lieu de me dépplacer a la position de la box je suis déplacé a l'opposé.

" editor.translate_to = function(x, y) {
var pos_x = x (this.precanvas.clientWidth / (this.precanvas.clientWidth this.zoom)) - (this.precanvas.getBoundingClientRect().x (this.precanvas.clientWidth / (this.precanvas.clientWidth this.zoom)));
var pos_y = y (this.precanvas.clientHeight / (this.precanvas.clientHeight this.zoom)) - (this.precanvas.getBoundingClientRect().y (this.precanvas.clientHeight / (this.precanvas.clientHeight this.zoom)));

this.canvas_x = pos_x;
this.canvas_y = pos_y;
let storedZoom = this.zoom;
this.zoom = 1;
this.precanvas.style.transform = "translate(" + pos_x + "px, " + pos_y + "px) scale(" + this.zoom + ")";
this.zoom = storedZoom;
this.zoom_last_value = 1;
this.zoom_refresh();
}

var infonode = '';

$("#search").on('keyup', function(e) {
e.preventDefault();
var value = $(this).val().toLowerCase();
$(".drawflow-node").filter(function() {
var isFind = $(this).text().toLowerCase().indexOf(value) > -1;
if (isFind) {
$(this).addClass("isFind");
var idnode = $(this).attr('id').replace('node-', '');
infonode = editor.getNodeFromId(idnode);
} else {
$(this).removeClass("isFind");
}
if (value == '') {
infonode = '';
$(this).removeClass("isFind");
}
});

if (infonode != '') {
console.log('infonode -----');
console.log(infonode.pos_x + ' / ' + infonode.pos_y);
editor.translate_to(infonode.pos_x, infonode.pos_y);
}
}); "

Aucune réponse