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

Add step.toString() and sequencer.toString() methods #250

Closed
jywarren opened this issue May 7, 2018 · 4 comments
Closed

Add step.toString() and sequencer.toString() methods #250

jywarren opened this issue May 7, 2018 · 4 comments
Assignees
Milestone

Comments

@jywarren
Copy link
Member

jywarren commented May 7, 2018

Breaking this out of #200 --

Based loosely on:

function removeStepUi() {
var index = $(removeStepSel).index(this) + 1;
sequencer.removeSteps(index).run();
// remove from URL hash too
var urlHash = getUrlHashParameter("steps").split(",");
urlHash.splice(index - 1, 1);
setUrlHashParameter("steps", urlHash.join(","));
}

and discussion from #200

Much discussion of how to implement per-step options in #127

however this can start with just a standardized way to get a list of all current steps in a string, so:

sequencer.toString()

Right now, each image in the sequencer has its own steps, but are these all identical? I feel they ought to be -- according to our model, it should be a consistent sequence that you then pass images through, not a collection of images which you assign steps to.

So really we may need to rework this to be sequencer.steps rather than sequencer._image_name_.steps before we can continue this project.

But once this is done, we can do a follow-up where each step can return its settings, like for example: sequencer.step[0].toString() => "blur[amount:40]" or similar

@jywarren
Copy link
Member Author

Here's where we're adding new steps to the URL hash string, which is similar although this code is not that flexible. With the new sequencer.toString() we could just replace the URL hash with the complete string the sequencer produces:

// add to URL hash too
var hash = getUrlHashParameter("steps") || "";
if (hash != "") hash += ",";
setUrlHashParameter("steps", hash + $(addStepSel + " select").val());

@tech4GT
Copy link
Member

tech4GT commented May 28, 2018

@jywarren I completely get this!! Awesome!!

@tech4GT
Copy link
Member

tech4GT commented May 28, 2018

@jywarren should I move onto this or complete all the functions of #242 ??

@jywarren
Copy link
Member Author

jywarren commented May 28, 2018 via email

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

2 participants