right click by mouse - Forum

Forum Navigation
You need to log in to create posts and topics.

right click by mouse

how can I define action to a right click?

Hi @info1, by now you can use a code like this one (see attached sample):

NeoScriptToJS
BeginJS
$( "#Container1" ).contextmenu(function() {
  neosubroutine.mysubroutine();
  return false;
});
EndJS

In the next version there will be special commands to manage more kind of events.
Regards.

Uploaded files:
  • You need to login to have access to uploads.
Vadim and Peter have reacted to this post.
VadimPeter

hi,

why it is not work?

 

@farhad2008 it works:
1) Press the button
2) Right click on the Container.

sorry  not work

Quite strange @farhad2008, it works for me in all the web browsers.
Can anyone confirm please?
Thank you!

farhad2008 has reacted to this post.
farhad2008

@luishp

Can anyone confirm please?

Works for me (Windows 10, Chrome Version 75.0.3770.142 (Official Build) (64-bit))

farhad2008 has reacted to this post.
farhad2008

sorry i reinstall browser and fixed

thank you @loishp

farhad2008 has reacted to this post.
farhad2008

@info1, @farhad2008, @gaev with the new version it's quite more simple:

OnMouseEvent "Container1" "contextmenu" "mysubroutine"

 

Peter has reacted to this post.
Peter

thanks! (I did not think, that you published the new version so fast! This case I would wait with my app to use the new features.)

on a FabricJS container it did not work, so I managed my idea in another way.

(I am so excited that I cannot do anything else but developing the app! :-) )