-
Hey there, As in my experiment it is very important that stimuli will be presented in the same size for all subjects, I was wondering whether there is any way to disable browser zooming during the experiment. I'm using the 'resize' plugin and 'fullscreen' plugin, but as long that zoom is enabled I can't be really sure about the stimuli size. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @yuvalharr, Not that I know of. I suspect it is not possible because that would get in the way of accessibility, which browsers are interested in maintaining. You can detect zoom events though: var zoom_event = [];
window.onresize = function(){
console.log(window.devicePixelRatio);
zoom_event.push({timestamp: performance.now(), zoom_ratio: window.devicePixelRatio});
}
// add this trial to your timeline near the end of the experiment
// this will store the zoom_event data in the data for this trial.
var record_zoom_events = {
type: 'call-function',
func: function(){
return JSON.stringify(zoom_event);
}
} I'd suggest:
|
Beta Was this translation helpful? Give feedback.
-
Edit: My suggestion below to add the viewport settings in a I think this is possible using a <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> But from this page I see that some browsers might choose to ignore the |
Beta Was this translation helpful? Give feedback.
Hi @yuvalharr,
Not that I know of. I suspect it is not possible because that would get in the way of accessibility, which browsers are interested in maintaining.
You can detect zoom events though:
I'd suggest: