Moved the .remove to UserInterface.js

This commit is contained in:
Chinmay Pandhare
2017-03-30 16:28:01 +05:30
parent f5ac3f4407
commit 4cf5bfacd2
3 changed files with 8 additions and 4 deletions

View File

@@ -184230,7 +184230,7 @@ ImageSequencer = function ImageSequencer(options) {
for (i=0;i<steps.length;i++) { for (i=0;i<steps.length;i++) {
if (steps[i].options.id == id && steps[i].options.name != 'image-select'){ if (steps[i].options.id == id && steps[i].options.name != 'image-select'){
console.log('removing step "'+steps[i].options.name+'"'); console.log('removing step "'+steps[i].options.name+'"');
if (options.inBrowser) $('div#sequencer-'+id).remove(); if (options.inBrowser) steps[i].options.ui.remove();
steps.splice(i,1); steps.splice(i,1);
run(options.initialImage); run(options.initialImage);
} }
@@ -184317,7 +184317,9 @@ module.exports = function UserInterface(options) {
} }
// method to remove the UI for a given method, and remove the step // method to remove the UI for a given method, and remove the step
function remove() {} function remove() {
$('div#sequencer-'+options.id).remove();
}
// method to reorder steps, and update the UI // method to reorder steps, and update the UI
//function move() {} //function move() {}

View File

@@ -84,7 +84,7 @@ ImageSequencer = function ImageSequencer(options) {
for (i=0;i<steps.length;i++) { for (i=0;i<steps.length;i++) {
if (steps[i].options.id == id && steps[i].options.name != 'image-select'){ if (steps[i].options.id == id && steps[i].options.name != 'image-select'){
console.log('removing step "'+steps[i].options.name+'"'); console.log('removing step "'+steps[i].options.name+'"');
if (options.inBrowser) $('div#sequencer-'+id).remove(); if (options.inBrowser) steps[i].options.ui.remove();
steps.splice(i,1); steps.splice(i,1);
run(options.initialImage); run(options.initialImage);
} }

View File

@@ -19,7 +19,9 @@ module.exports = function UserInterface(options) {
} }
// method to remove the UI for a given method, and remove the step // method to remove the UI for a given method, and remove the step
function remove() {} function remove() {
$('div#sequencer-'+options.id).remove();
}
// method to reorder steps, and update the UI // method to reorder steps, and update the UI
//function move() {} //function move() {}