-
Notifications
You must be signed in to change notification settings - Fork 208
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
Stops loading of blend-module when offset unavailable #654
Changes from 9 commits
e48b558
af6fee7
92cfe4a
bac7bd2
14b4c7e
0e3e346
27cc957
c6f10c9
0899dae
90733ab
8167652
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function produceNotification(msg) { | ||
if ($('#notification-styles').length == 0) { | ||
var notification = document.createElement('span'); | ||
notification.innerHTML = ' <i class="fa fa-info-circle" aria-hidden="true"></i> ' + msg ; | ||
notification.id = 'notification-styles'; | ||
|
||
$('body').append(notification); | ||
} | ||
|
||
$('#notification-styles').fadeIn(500).delay(200).fadeOut(500); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,9 @@ if (program.saveSequence) { | |
for (var output in step.info.outputs) { | ||
console.log("[" + program.step + "]: " + output + " = " + step[output]); | ||
} | ||
}, | ||
onNotify: function(msg) { | ||
console.log('\x1b[36m%s\x1b[0m','🌟 '+msg); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this overwrite the default in /src/ui/...? Just checking! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not much though providing a beautiful version in console.log |
||
} | ||
}); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,12 @@ module.exports = function Dynamic(options, UI, util) { | |
// save first image's pixels | ||
var priorStep = this.getStep(options.offset); | ||
|
||
if (priorStep.output === undefined) { | ||
this.output = input; | ||
UI.onNotify('Offset Unavailable','offset-notification'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, if we're going to use it like this, maybe best have it just be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah sure.. |
||
callback(); | ||
} | ||
|
||
getPixels(priorStep.output.src, function(err, pixels) { | ||
options.firstImagePixels = pixels; | ||
|
||
|
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.
Could we make a generic reusable
.notification
class here?We can still leave the
id
s for hiding/showing uniquely. But to have a generic style seems nice and then it can be reused for more things later.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.
Done 👍