We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

findObjectUnderMouse eventArg is null

Thread ID:





150081 Dec 19,2019 02:26 PM UTC Dec 20,2019 05:28 AM UTC Angular - EJ 2 1
Tags: Diagram
Gabo EE
Asked On December 19, 2019 02:26 PM UTC

I am experiencing this error when connecting two ports. I have looked into source code and it would be great if ejs library would null check eventArg value

ERROR TypeError: Cannot set property 'actualObject' of null
    at ObjectFinder.findObjectUnderMouse (ej2-diagrams.es2015.js:24520)
    at DiagramEventHandler.findObjectUnderMouse (ej2-diagrams.es2015.js:24045)
    at ComponentBase.findObjectUnderMouse (ej2-diagrams.es2015.js:30780)
    at DiagramEventHandler.mouseMove (ej2-diagrams.es2015.js:23038)
    at ZoneDelegate.invokeTask (zone-evergreen.js:400)
    at Object.onInvokeTask (core.js:39680)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Zone.runTask (zone-evergreen.js:168)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:481)
    at invokeTask (zone-evergreen.js:1596)

Problematic source code

  if ((action === 'ConnectorSourceEnd' && source || action === 'PortDraw') ||
                ((canDrawOnce(diagram) || canContinuousDraw(diagram)) && getObjectType(diagram.drawingObject) === Connector)) {
                let connector = diagram.selectedItems.connectors[0];
                for (let i = objects.length - 1; i >= 0; i--) {
                    outPort = getInOutConnectPorts(objects[i], false);
                    if (objects[i] instanceof Node && (canOutConnect(objects[i]) || (canPortOutConnect(outPort)))) {
                        actualTarget = objects[i];
                        if (connector) {
                            actualTarget = this.isTarget(actualTarget, diagram, action);
                        eventArg.actualObject = actualTarget;
                        return actualTarget;

Shyam G [Syncfusion]
Replied On December 20, 2019 05:28 AM UTC

Hi Gabo, 

We have checked your issue in our sample and we are unable to replicate an issue at our end. Please share us more details such as exact use case to replicate an issue or modify the below sample. 

Shyam G 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon