magpie-ea / magpie-modules

the reusable front-end bits in the _magpie modules
MIT License
7 stars 1 forks source link

Allow setting attributes for all trials #60

Open n-kall opened 5 years ago

n-kall commented 5 years ago

Currently it seems we need to specify all trial info in every single trial, even when it is completely redundant. For example, in the 'key press' view template, we need to include "key1" and "key2" in each individual trial object.

It would be great if when instantiating the view we could do something like this:

const practice = babeViews.keyPress({
    trials: 12,
    name: 'practice',
    trial_type: 'practice',
    data: practice_trials_info,
    key1: "f",
    key2: "j",
    f: "same",
    j: "different",
});