-
Notifications
You must be signed in to change notification settings - Fork 210
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
Removed redundant parameters in ImageSequencer.js #967
Conversation
I think I need more details to the last phrase in the instructions, telling me to remove the export of loadImages, I tried deleting that line and cannot pass the test.
@publiclab/is-reviewers |
@publiclab/is-reviewers |
Does the issue mention something like that? |
The issue says: |
Ok let it be. Doesn't matter. |
@Divy123 does ImageSequencer no longer hold multiple imgs? Also please review this. |
@vajean you can leave the loadImages() part. |
@vajean I also request you to test your branch's code in browser as sometimes only the tests are not sufficient . |
What is the use of |
I mean loadImages() The func name is the same |
Does it not support multiple images or different steps for different imgs? |
I mean that |
This is from src/ImageSequencer.js function loadImages() {
var args = [];
var prevSteps = this.getSteps().slice(1).map(step=>step.options.name)
var sequencer = this;
sequencer.image = arguments[0];
for (var arg in arguments) args.push(copy(arguments[arg]));
var json_q = formatInput.call(this, args, "l");
if(this.getSteps().length!=0){
this.options.sequencerCounter = 0;
inputlog = [];
this.steps = [];
}
inputlog.push({ method: "loadImages", json_q: copy(json_q) });
var ret = {
name: "ImageSequencer Wrapper",
sequencer: this,
addSteps: this.addSteps,
removeSteps: this.removeSteps,
insertSteps: this.insertSteps,
run: this.run,
UI: this.UI,
setUI: this.setUI
}; |
Is it something where we wanted to preserve backwards-compatibility for
single-image uses that had been using loadImages()? And if so, perhaps we
should put a comment next to that line in the code to note that it's for
backwards compatibility only and doesn't actually support multiple images?
Just wondering, i'm not sure.
…On Mon, Apr 1, 2019 at 3:56 AM Slytherin ***@***.***> wrote:
@vajean <https://github.com/vajean> I also request you to test your
branch's code in browser as sometimes only the tests are not sufficient .
If everything goes well, the PR will be ready to merge.
Thanks a lot for your precious contributions.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#967 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ49jRPUgQy3omOeWJUQ_WHrQ9LQ5ks5vcbt7gaJpZM4cUl83>
.
|
@jywarren the loadImages() and loadImage() are an abstraction of the same function loadImages(). But since we use only one image, I think we can remove loadImages() from the export but since @vajean is encountering some error removing which can be due to its usage in some UI code, I will send a PR after figuring it out. |
Hi, I have installed and tested it in a browser on my computer, everything works as the demo on your repo. |
I think this is ready to be merged. |
@@ -102,7 +102,7 @@ ImageSequencer = function ImageSequencer(options) { | |||
return this; | |||
} | |||
|
|||
function insertSteps(image, index, name, o) { | |||
function insertSteps() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, was this at some point to allow inserting a step at a different index? And same for removeSteps()
above? @Divy123
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are managing that through arguments array.
Congrats on merging your first pull request! 🙌🎉⚡️ |
Thank you!!! This is great. |
Fixes #959
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
npm test
@publiclab/is-reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!