@@ -27,47 +27,20 @@ StackVisualizer.msToWaitBeforeQueueing = 0; //setTimeout timer
2727StackVisualizer . msToWaitPerCall = 0 ; //delay between calls
2828
2929
30- /*
31- //Have an element with id myQueue
32- var qname = 'stackAnimQueue';
33-
34- //Add animation to the queue
35- $('#myQueue').queue(qname, function(next) {
36- $('#t1').animate({
37- left: 100
38- }, {
39- duration: stackAnimationTime,
40- queue: false, //so other anim queues are independent
41- complete: next //THIS IS IMPORTANT FOR ANIMATION
42- });
43- });
44-
45- //Add variable actions to the queue
46- $('#myQueue').queue(qname, function(next) {
47- console.log("Remove");
48- $('#t1').append(stackElement);
49- $('#t1').remove();
50- $('#myQueue').dequeue(qname); //THIS IS IMPORTANT TO CONTINUE THE QUEUE SEQUENCE
51- });
52-
53- $('#myQueue').dequeue(qname); //Needed at some point to start the queue sequence
54-
55- */
56-
5730function StackVisualizer ( elemID , isHiddenStack ) {
5831 this . name = "Bitcoin Stack Visualizer" ;
5932 this . stack = new Array ( ) ;
6033 this . hasFailed = false ;
6134
62- if ( isHiddenStack == undefined || ! isHiddenStack ) {
35+ if ( elemID != undefined && ( isHiddenStack == undefined || ! isHiddenStack ) ) {
6336 this . parentID = elemID ;
6437 this . stackID = StackVisualizer . stackID ;
6538 this . parentElement = $ ( "#" + elemID ) ;
6639 this . createStackDiagram ( ) ;
6740 this . isHiddenStack = false ;
6841 this . callerCount = 0 ;
6942 } else {
70- this . isHiddenStack = true ;
43+ this . isHiddenStack = true ; //Do not visualize this stack
7144 }
7245}
7346
0 commit comments