Up until a bit over a year ago, the following code snippet worked to
a) prevent scrolling in the main page when the cursor was over the canvas
and
b) store data about scrolling in a variable so you can do with it whatever you like
var window = (function(what) {return this[what];})("window");
var canvas = window.Processing.instances[0].externals.canvas;
canvas.onwheel = function(event){
event.preventDefault();
scroll -= event.deltaY;
};
It no longer works. Not only that, but it stops any program with that code in it from loading. I would like to see any currently working methods of doing what I described above.
I'm not a very advanced user, so a lot of these code snippets with strange syntax I wouldn't ordinarily write into a program confuse me. If any of you could advise on how to create these (without just finding them and bending them to my needs), that would be very welcome.
Thanks,
Hunter