@ash wrote:
Hi team,
Am trying to use contextMenu in my app for floorplanner, but am unable to get the object data on click event when i click anywhere other then my selected object as in “CASE :2”. It worked perfectly when in click on object itself as in “CASE :1”.
My code:
$("ContextMenuButton", $(go.TextBlock, "ShowFloor"), { click: function (e, obj) { console.log('here1'); console.log(obj.part.data.startpoint); console.log('here2'); FloorplanFilesystem.prototype.loadFloorplan(0,obj); } }, new go.Binding("visible", "", function (v, obj) { if (obj.part.diagram !== null) { return obj.part.diagram.selection.count > 0; } return false; }).ofObject() )
And am getting this error:
“Uncaught TypeError: Cannot read property ‘x’ of undefined
at Object.FloorplanFilesystem.loadFloorplanElevation (FloorplanFilesystem.js:729)”Any help would be appreciated, thanks.
Posts: 2
Participants: 2