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 via HTML ui in demo errors in PixelManipulation #9

Closed
jywarren opened this issue Mar 11, 2017 · 4 comments
Closed

Add Step via HTML ui in demo errors in PixelManipulation #9

jywarren opened this issue Mar 11, 2017 · 4 comments
Assignees

Comments

@jywarren
Copy link
Member

As described in #6, in comments, after merging #6, I still got:

Uncaught TypeError: Cannot read property 'src' of undefined
    at PixelManipulation (image-sequencer.js:184462)

on this line: https://github.com/publiclab/image-sequencer/blob/master/src/modules/PixelManipulation.js#L17

when adding a new step via the HTML ui. But then when I drop a new image into the image-select UI, all steps run correctly.

This may have to do with sequencer.run()

@rackstar17
Copy link

sequencer.run() expects an image parameter
file - dist/image-sequencer.js line -184165

function run(image) {
    if (image) steps[1].draw(image);
    else steps[0].draw();
  }

So maybe it's not catching the image and that's why showing undefined error

I might be wrong since I just started looking at the codebase
What do you think @jywarren ?

@jywarren
Copy link
Member Author

jywarren commented Mar 11, 2017 via email

@ccpandhare
Copy link
Collaborator

@jywarren Yes, I too believe that image-select shouldn't be treated as a module, and be a part of HTML UI.

For now, I have fixed the issue by declaring a global variable document.sequencer_image.
I think we should come up with a better solution.

PR #12

@ccpandhare
Copy link
Collaborator

We have shifted quite a lot from this code, and this issue is fixed, so closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants