I’m trying to see if I can have a context menu come up on screen touch and mouse right click only(mouse left click would just trigger some other code). This code doesn’t really seem to be working, however.
var menuA = new DayPilot.Menu({
//menu items here
});
dp.onEventClick = function(args) {
var touched = !!args.originalEvent.changedTouches;
if (touched) {
menuA.show(args.e, touched);
}
else {
//do something else
}
};
I am also wondering if it would be possible to pass information from the onEventClick event to the context menu’s onShow event, as to hide/show certain different menu options based on whether the user touched the event or right clicked the event.
For example, if the user touched the event on the screen, I’d like to show in my menu an extra option for “view event”(which would also be the default behavior when I left click with the mouse).