2

I am using a library called mxGraph and in my code I subscribe for an event. In the callback function I receive according to the documentation the sender object and the event object. I outputted the event object to the console and got the following:

enter image description here

My question is how to get cells?

Thanks.

Martin

1 Answer 1

4
mxEventObject.properties.cells

or

mxEventObject['properties']['cells']
Sign up to request clarification or add additional context in comments.

4 Comments

according to the output, properties is an array, so you would need a [] or similar in there somewhere.
no, this works fine. in javascript lines blur in the differences between an Array and an Object.
Yes, it works fine. I was trying with mxEventObject.properties[0].cells but getting mxEventObject.properties[0] is undefined
yes, generally speaking array's in javascript are simply objects with enumerated property names.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.