-
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
Fix for Issue9 : Error while adding a new step from HTML UI, A small fix for #7 #12
Conversation
I have also fixed a small variable name issue for FireFox |
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, though -- this is basically using a global, no? Is there a more local way to do that, and is it specific to the demos?
There is a local way to do it. |
Local to the module, right? Yes, that sounds good!
…On Mar 12, 2017 3:51 PM, "Chinmay Pandhare (CCD)" ***@***.***> wrote:
There is a local way to do it.
By creating options.initial_image instead of document.sequencer_image.
Is that okay?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ73CQ30HgZBic3IYP1xec9nvb7P-ks5rlEyvgaJpZM4MaeZ3>
.
|
Yep. I've done that now. |
Oh, hmm, but |
Oh, i see -- this line shows that we store Thank you so much for all this, it's pretty complex, and I appreciate your careful thought and contribution! |
@jywarren I'm afraid you're getting me wrong. Let me try to eplain. IssueThe issue was that /src/ImageSequencer.js defines
But the function
SolutionSo basically, we needed a starting point (image) for drawing. Hence, I decided to introduce a variable local to the ImageSequencer instance.
Some Notes / ConcernsSorry, I should have mentioned all this in the Pull Request. And as far as the What do you think about this? Should we stick to something like |
I think we're struggling with multiple issues here, so perhaps we should just implement a short term fix and treat them separately. But I guess I was thinking that any module should have There's nothing API dependent about the sequencer also tracking its initial image, so I'm OK with it on those grounds, but I guess I have a mental model of the sequencer that's not state-ful. Now that I think about it, the modules are stateful because they can be configured. They might also be stateful in that they (if we do this) remember the last input and output images that passed through them. I tend to think as little state as possible is ideal. But the sequencer too has state - its list of steps. What do you think of all this? We also need not make a permanent decision on it. We may find later that we run into stronger reasons to change these decisions. For the time being, I'm fine merging this, though I think we should standardize to camelCase for |
Yes, As we were discussing earlier, we should create the So, what is the model of Image-Sequencer which you have in mind? How do you wish to implement it? As far As the CamelCasing is concerned, I'll do that. |
I agree completely, and that's why I'm being extra cautious at this stage. I appreciate your patience :-) Let me look at this when i have a moment today and may just merge it, since I feel my #1 changes are holding things up... |
So should we wait until we find a solution for #1 and then merge this? |
@@ -5,6 +5,7 @@ ImageSequencer = function ImageSequencer(options) { | |||
options = options || {}; | |||
options.inBrowser = options.inBrowser || typeof window !== 'undefined'; | |||
if (options.inBrowser) options.ui = options.ui || require('./UserInterface'); | |||
options.initialImage = ""; |
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.
Do we need to set it to "" right here? Can't we just start using it, and it will be default undefined (so options.initialImage !== undefined
) until we fill it? Not a big deal but want to be pretty tidy in this code as it's core functionality. Thanks!
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.
Okay, I'll do that.
I'll remove that line.
Do you think you could rebase and recompile? I think we can pull this in for now and resolve #1 anyhow, since this will make the current functionality work better in Firefox, right? |
Yes, It will make things work in Firefox, but that's a very small bugfix, anyways. Okay I'll recompile. |
I have fixed the Issue for now by declaring a global variable document.sequencer_image.