Skip to content

Show/hide cover by creating it in advance and manipulate opacity? #17

@tpronk

Description

@tpronk

Heya, @RebeccaHirst further developed my PsychoPy/PsychoJS demo, and now I'm further developing that again. Got a little suggestion that might benefit the way the cover is set up...

I noticed that in the reference Gorilla implementation, the cover DIV is created on the first trial, and manipulated via show/hide (i.e. setting the CSS property display to none or block). This can be a bit laggy (see this excellent paper ;) and this one)

Got two suggestions (which are implemented in an updated PsychoJS demo):

  1. Create the DIV in advance
  2. Show/hide it by manipulating opacity

To ensure that clicks on the cover are still bubbled to any HTML elements below it, set this CSS property: pointer-events: none;.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions