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

this.stringToSteps is not a function in ReplaceImage #1030

Open
jywarren opened this issue Apr 19, 2019 · 5 comments · May be fixed by #1625
Open

this.stringToSteps is not a function in ReplaceImage #1030

jywarren opened this issue Apr 19, 2019 · 5 comments · May be fixed by #1625
Assignees
Labels

Comments

@jywarren
Copy link
Member

Hi @VibhorCodecianGupta -- thank you SO MUCH for #787 -- i'm really excited to put it to use.

I noticed an error in replaceImage --

Uncaught TypeError: this.stringToSteps is not a function

It seems to be related to this scope in this segment of code:

function make(url) {
tempSequencer.loadImage(url, function(){
// this.addSteps(steps).run({stop:function(){}},function(out){
var sequence = this.addSteps(steps)
if (ref.detectStringSyntax(steps))
sequence = this.stringToSteps(steps)
sequence.run({stop:function(){}},function(out){
img.src = out;
});
});
}
}

You can reproduce it by clicking any button on this page:

https://publiclab.github.io/leaflet-tile-filter/

Would you have a little time to check this out? Thank you so much!

@vibhorgupta-gh
Copy link

On it. A little help, how to reproduce this on Image Sequencer? This runs in the browser context, right? I'll solve this and #1029 in the same PR

@jywarren
Copy link
Member Author

Ah, yes. Uh, i think we can initialize a new sequencer with s = new ImageSequencer(); s.replaceImage(...) in the console, at least for testing. Perhaps we should create a test for it as well. Thank you!

@vibhorgupta-gh
Copy link

I'll get it working, then. See if we can create a test case here too.

@vibhorgupta-gh
Copy link

@jywarren I think I managed to get this working, however, I want to test it out once. The browser script should run, but is not for me, for some reason. The image having that CSS selector remains unchanged with undefined console output. Were you able to reproduce this in the console?
I don't want to push the code without proofing it first, thanks

@jywarren
Copy link
Member Author

Hmm, so, can you show the solution you've got in a PR? I can try testing it, or if you want to download https://publiclab.github.io/leaflet-tile-filter/ and point it at your modified version, to confirm, that'd work too. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants