Hi Alfred,
I have confirmed that with the call:
board.containerObj.oncontextmenu = null;
the context menu is enabled again.
Out of curiosity: what may have been the reason for disabling the right click?
The changelog gives for the changes of 0.99.6
bug fixes: hide context menu
Incidentally:
After I had confirmed it dawned on me that the Firefox browser already has me covered. Firefox has versatile screenshot support. Depending on where you hover the mouse Firefox frames a div to capture. So you get consistently the same width and height. You can hit pretty much any div
I surmise it is the *browser* that provides the functionality to save a canvas rendered element as .png file.
That is: I surmise JSXGraph has no control over how the .png file comes out.
(For the purpose of testing: as far as I can tell rightclicking cannot be tested using JSFiddle, since JSFiddle uses frames. If I rightclick in JSFiddle I get the context menu for a frame.)
I uploaded a test graph:
This graph is set to be rendered as canvas element, and context menu is enabled
http://cleonis.nl/physics/sandbox_jsxgraph/graphlet_test_rightclick.html This layout has two JSX boards side by side, each 256 by 256px
When I rightclick on a graph and save:
the .png file that is produced is 512x512 instead of 256x256, and the background color is set to transparent.
I suppose JSXGraph sets the background color at the HTML/CSS level, and not at the graph rendering level, so that when a canvas element is saved as .png file the background is always transparent.
It's not clear to me why the HTML 'canvas' element even exists: as far as I can tell there are no websites that use canvas rendering. There are webpages where it is described how the 'canvas' element can be used, but even those webpages do not actually use the 'canvas' element, they use straightforward images. It seems the 'canvas' element doesn't serve any purpose.
Cleon Teunissen