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

replaceImage() returns error #147

Open
1 of 2 tasks
jywarren opened this issue Oct 19, 2017 · 4 comments · May be fixed by #1625
Open
1 of 2 tasks

replaceImage() returns error #147

jywarren opened this issue Oct 19, 2017 · 4 comments · May be fixed by #1625
Labels
bug has-pull-request Issues which have a PR open help wanted

Comments

@jywarren
Copy link
Member

jywarren commented Oct 19, 2017

I see an error on running:

sequencer.replaceImage('img', 'invert');

in the console on the demo

The error is at addSteps() on this line, which by the way maybe should be broken into multiple lines for readability:

      this_.loadImage('default',url).addSteps('default',steps).run(function(out){

https://github.com/publiclab/image-sequencer/blob/master/src/ReplaceImage.js#L28

I think this is because in loadImage() we don't return this and so it's not chainable. That's on this line:

Should return this go here? -- https://github.com/publiclab/image-sequencer/blob/master/src/LoadImage.js#L100

We should solve this but also add tests for:

  • if this method and others are chainable
  • if replaceImage() works (this should be testable, no?)

Thanks!

@jywarren
Copy link
Member Author

The contributors most likely able to help are:

@jywarren
@ccpandhare

@jywarren
Copy link
Member Author

@ccpandhare if you have a chance to try a fix for this, much appreciated! I tried a couple things and didn't make a lot of progress :-/

@ccpandhare
Copy link
Collaborator

ccpandhare commented Oct 25, 2017 via email

@ccpandhare
Copy link
Collaborator

Sorry, this was a mistake on my part.
Fixed the other things, but I don't think replaceImage is meant to be chainable (it isnt).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug has-pull-request Issues which have a PR open help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants