Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make defaults options editable #5

Open
jvolker opened this issue May 24, 2020 · 0 comments
Open

Make defaults options editable #5

jvolker opened this issue May 24, 2020 · 0 comments

Comments

@jvolker
Copy link
Contributor

jvolker commented May 24, 2020

As requested in OpenframeProject/Openframe#82 it seems like a good idea to make those default options editable.

I suggest a similar approach to what has been done in the slideshow extension – prioritising settings like this: per artwork > frame settings > coded defaults

https://github.com/jmwohl/Openframe-Slideshow/blob/master/extension.js

function getDuration(frameState, artwork) {
            var duration;
            if (artwork.settings && artwork.settings[pjson.name] && artwork.settings[pjson.name].duration) {
                duration = minToMillis(artwork.settings[pjson.name].duration);
            } else if (frameState.settings && frameState.settings[pjson.name] && frameState.settings[pjson.name].duration) {
                duration = minToMillis(frameState.settings[pjson.name].duration);
            } else {
                duration = minToMillis(DEFAULT_DURATION);
            }
            return duration;
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant