mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-15 04:40:02 +01:00
passing tests and displaying titles in web UI
This commit is contained in:
@@ -8,13 +8,13 @@ module.exports = function UserInterface(options) {
|
||||
|
||||
options.random = options.random || parseInt(Math.random() * (new Date()).getTime() / 1000000);
|
||||
options.uniqueSelector = options.uniqueSelector || options.selector + '-' + options.random;
|
||||
$(options.container).append('<div class="panel ' + options.selector + ' ' + options.uniqueSelector + '"></div>');
|
||||
$(options.container).append('<div class="panel ' + options.selector + ' ' + options.uniqueSelector + '"><div class="image"></div></div>');
|
||||
options.el = options.el || $('.' + options.uniqueSelector);
|
||||
createLabel(options.el);
|
||||
|
||||
// method to remove the UI for a given method, and remove the step
|
||||
function display(image) {
|
||||
options.el.html(image);
|
||||
options.el.find('.image').html(image);
|
||||
}
|
||||
|
||||
// method to remove the UI for a given method, and remove the step
|
||||
@@ -24,8 +24,7 @@ module.exports = function UserInterface(options) {
|
||||
//function move() {}
|
||||
|
||||
function createLabel(el) {
|
||||
console.log("createLabel", module.title)
|
||||
el.append('<h3 class="title">' + module.title + '</h3>');
|
||||
if (options.title) el.prepend('<h3 class="title">' + options.title + '</h3>');
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user