Well it’s the other way actually, I wanted to move the element by dragging the overlay on top of element (you’ll see the element side edge showing under overlay), not sure if this is possible. Thank you for your response by the way.
I am also thinking if it’s not possible, do you think it’s much easier if I can just add a move icon in context pad instead?
Okay thank you for this however I am not sure how to use it?
let’s say I do have this code:
var elementRegistry = bpmnModeler.get('elementRegistry');
$(document).on('mousedown', ".class-of-overlay", function () {
var elementID = $(this).attr('elementID');
const element = elementRegistry.get(elementID);
// Function to select the element above
}).on('mousemove', ".class-of-overlay", function () {
var elementID = $(this).attr('elementID');
const element = elementRegistry.get(elementID);
// Function to move the element above while on mouse hold/drag
}).on('mouseup', ".class-of-overlay", function () {
var elementID = $(this).attr('elementID');
const element = elementRegistry.get(elementID);
// Function to drop the element above after mouseup
});
how do I do this? sorry I am still newbie on bpmn js.