isAllowedInteraction(ev) {
        if (self.group !== "segmentation") return true;
        if (ev.offsetX > self.obj.canvasSize.width) return false;
        if (ev.offsetY > self.obj.canvasSize.height) return false;
        return true;
      }
Determines if an interaction is allowed based on the current context and event properties.

@param {Object} ev - The event object containing details about the interaction.
@return {boolean} Returns true if the interaction is allowed, otherwise false.