OptionalclickableOptionalonWhen you click on the element, the click event is called.
import Moveable from "@moveable-next/vanilla";
const moveable = new Moveable(document.body, {
target: document.querySelector(".target"),
});
moveable.on("click", ({ hasTarget, containsTarget, targetIndex }) => {
// If you click on an element other than the target and not included in the target, index is -1.
console.log("onClickGroup", target, hasTarget, containsTarget, targetIndex);
});
OptionalonWhen you click on the element inside the group, the clickGroup event is called.
import Moveable from "@moveable-next/vanilla";
const moveable = new Moveable(document.body, {
target: [].slice.call(document.querySelectorAll(".target")),
});
moveable.on("clickGroup", ({ inputTarget, isTarget, containsTarget, targetIndex }) => {
// If you click on an element other than the target and not included in the target, index is -1.
console.log("onClickGroup", inputTarget, isTarget, containsTarget, targetIndex);
});
Whether to trigger the moveable's click event.