From 1b391be9508d5d170b1a29b8aea3142974e33bbf Mon Sep 17 00:00:00 2001 From: AdiChops Date: Sun, 2 May 2021 18:02:16 -0400 Subject: [PATCH 1/2] styling updates --- JavascriptVisualRelease/AVLtree.html | 125 ++++++++++++++++- JavascriptVisualRelease/Algorithms.html | 6 +- .../AnimationLibrary/AnimationMain.js | 86 ++++++------ .../AnimationLibrary/CustomEvents.js | 10 +- .../AnimationLibrary/navigation.js | 39 ++++++ JavascriptVisualRelease/BFS.html | 125 ++++++++++++++++- JavascriptVisualRelease/BPlusTree.html | 7 +- JavascriptVisualRelease/BST.html | 123 ++++++++++++++++- JavascriptVisualRelease/BTree.html | 7 +- JavascriptVisualRelease/BinomialQueue.html | 125 ++++++++++++++++- JavascriptVisualRelease/BucketSort.html | 128 +++++++++++++++++- .../ChangingCoordinates2D.html | 125 ++++++++++++++++- .../ChangingCoordinates3D.html | 125 ++++++++++++++++- JavascriptVisualRelease/ClosedHash.html | 125 ++++++++++++++++- JavascriptVisualRelease/ClosedHashBucket.html | 10 +- JavascriptVisualRelease/ComparisonSort.html | 7 +- .../ConnectedComponent.html | 125 ++++++++++++++++- JavascriptVisualRelease/CountingSort.html | 125 ++++++++++++++++- JavascriptVisualRelease/DFS.html | 125 ++++++++++++++++- JavascriptVisualRelease/DPChange.html | 125 ++++++++++++++++- JavascriptVisualRelease/DPFib.html | 125 ++++++++++++++++- JavascriptVisualRelease/DPLCS.html | 125 ++++++++++++++++- JavascriptVisualRelease/Dijkstra.html | 125 ++++++++++++++++- JavascriptVisualRelease/DisjointSets.html | 125 ++++++++++++++++- JavascriptVisualRelease/FibonacciHeap.html | 125 ++++++++++++++++- JavascriptVisualRelease/Floyd.html | 125 ++++++++++++++++- JavascriptVisualRelease/Heap.html | 125 ++++++++++++++++- JavascriptVisualRelease/HeapSort.html | 125 ++++++++++++++++- JavascriptVisualRelease/Kruskal.html | 125 ++++++++++++++++- JavascriptVisualRelease/LeftistHeap.html | 125 ++++++++++++++++- JavascriptVisualRelease/OpenHash.html | 125 ++++++++++++++++- JavascriptVisualRelease/Prim.html | 125 ++++++++++++++++- JavascriptVisualRelease/QueueArray.html | 125 ++++++++++++++++- JavascriptVisualRelease/QueueLL.html | 125 ++++++++++++++++- JavascriptVisualRelease/RadixSort.html | 125 ++++++++++++++++- JavascriptVisualRelease/RadixTree.html | 7 +- JavascriptVisualRelease/RecFact.html | 125 ++++++++++++++++- JavascriptVisualRelease/RecQueens.html | 125 ++++++++++++++++- JavascriptVisualRelease/RecReverse.html | 125 ++++++++++++++++- JavascriptVisualRelease/RedBlack.html | 125 ++++++++++++++++- JavascriptVisualRelease/RotateScale2D.html | 125 ++++++++++++++++- JavascriptVisualRelease/RotateScale3D.html | 125 ++++++++++++++++- .../RotateTranslate2D.html | 125 ++++++++++++++++- JavascriptVisualRelease/Search.html | 125 ++++++++++++++++- JavascriptVisualRelease/SimpleStack.html | 125 ++++++++++++++++- JavascriptVisualRelease/SkewHeap.html | 125 ++++++++++++++++- JavascriptVisualRelease/SplayTree.html | 125 ++++++++++++++++- JavascriptVisualRelease/StackArray.html | 125 ++++++++++++++++- JavascriptVisualRelease/StackLL.html | 125 ++++++++++++++++- JavascriptVisualRelease/TST.html | 7 +- JavascriptVisualRelease/TopoSortDFS.html | 125 ++++++++++++++++- JavascriptVisualRelease/TopoSortIndegree.html | 125 ++++++++++++++++- JavascriptVisualRelease/Trie.html | 7 +- JavascriptVisualRelease/about.html | 2 +- JavascriptVisualRelease/template.html | 125 ++++++++++++++++- .../visualizationPageStyle.css | 96 +++++++++++-- styles/styles.css | 2 +- 57 files changed, 5417 insertions(+), 252 deletions(-) create mode 100644 JavascriptVisualRelease/AnimationLibrary/navigation.js diff --git a/JavascriptVisualRelease/AVLtree.html b/JavascriptVisualRelease/AVLtree.html index 889d369..f9586d1 100644 --- a/JavascriptVisualRelease/AVLtree.html +++ b/JavascriptVisualRelease/AVLtree.html @@ -43,7 +43,123 @@

AVL Tree

-
+
+ +
@@ -59,7 +175,7 @@

AVL Tree

-
+
@@ -69,5 +185,6 @@

AVL Tree

- - + + + diff --git a/JavascriptVisualRelease/Algorithms.html b/JavascriptVisualRelease/Algorithms.html index 77e3eef..7c4b25a 100644 --- a/JavascriptVisualRelease/Algorithms.html +++ b/JavascriptVisualRelease/Algorithms.html @@ -43,8 +43,8 @@
  • Stack: Linked List Implementation
  • Queues: Array Implementation
  • Queues: Linked List Implementation
  • -
  • Lists: Array Implementation (available in java version)
  • -
  • Lists: Linked List Implementation (available in java version)
  • +
  • Lists: Array Implementation (available in java version)
  • +
  • Lists: Linked List Implementation (available in java version)
  • Recursion
  • @@ -144,7 +144,7 @@ diff --git a/JavascriptVisualRelease/AnimationLibrary/AnimationMain.js b/JavascriptVisualRelease/AnimationLibrary/AnimationMain.js index efc358e..aafdb67 100644 --- a/JavascriptVisualRelease/AnimationLibrary/AnimationMain.js +++ b/JavascriptVisualRelease/AnimationLibrary/AnimationMain.js @@ -222,7 +222,7 @@ function doPlayPause() paused = !paused; if (paused) { - playPauseBackButton.setAttribute("value", "play"); + playPauseBackButton.firstChild.setAttribute("class", "fas fa-play"); if (skipBackButton.disabled == false) { stepBackButton.disabled = false; @@ -231,7 +231,7 @@ function doPlayPause() } else { - playPauseBackButton.setAttribute("value", "pause"); + playPauseBackButton.firstChild.setAttribute("class", "fas fa-pause"); } animationManager.SetPaused(paused); } @@ -268,17 +268,30 @@ function addControlToAnimationBar(type,name,containerType) element.setAttribute("type", type); element.setAttribute("value", name); + var controlBar = document.getElementById("GeneralAnimationControls"); - var tableEntry = document.createElement("td"); + //Append the element in page (in span). + controlBar.appendChild(element); + return element; - tableEntry.appendChild(element); +} + +function addFAButtonToAnimationBar(faClass){ + var element = document.createElement("button"); + element.setAttribute("type", "button"); + element.setAttribute("class", "btn btn-outline-dark"); + element.innerHTML = ``; + var controlBar = document.getElementById("GeneralAnimationControls"); //Append the element in page (in span). - controlBar.appendChild(tableEntry); + if(!controlBar.firstElementChild){ + let newDiv = document.createElement("div"); + controlBar.appendChild(newDiv); + } + controlBar.firstElementChild.appendChild(element); return element; - } @@ -287,54 +300,29 @@ function initCanvas() canvas = document.getElementById("canvas"); objectManager = new ObjectManager(); animationManager = new AnimationManager(objectManager); - - skipBackButton = addControlToAnimationBar("Button", "Skip Back"); + skipBackButton = addFAButtonToAnimationBar("fas fa-fast-backward"); skipBackButton.onclick = animationManager.skipBack.bind(animationManager); - stepBackButton = addControlToAnimationBar("Button", "Step Back"); + stepBackButton = addFAButtonToAnimationBar("fas fa-step-backward"); stepBackButton.onclick = animationManager.stepBack.bind(animationManager); - playPauseBackButton = addControlToAnimationBar("Button", "Pause"); + playPauseBackButton = addFAButtonToAnimationBar("fas fa-pause"); playPauseBackButton.onclick = doPlayPause ; - stepForwardButton = addControlToAnimationBar("Button", "Step Forward"); + stepForwardButton = addFAButtonToAnimationBar("fas fa-step-forward"); stepForwardButton.onclick = animationManager.step.bind(animationManager) ; - skipForwardButton = addControlToAnimationBar("Button", "Skip Forward"); + skipForwardButton = addFAButtonToAnimationBar("fas fa-fast-forward"); skipForwardButton.onclick = animationManager.skipForward.bind(animationManager); var element = document.createElement("div"); - element.setAttribute("display", "inline-block"); - element.setAttribute("float", "left"); - - - var tableEntry = document.createElement("td"); + var tableEntry = document.createElement("div"); var controlBar = document.getElementById("GeneralAnimationControls"); - - - var newTable = document.createElement("table"); - var midLevel = document.createElement("tr"); - var bottomLevel = document.createElement("td"); - midLevel.appendChild(bottomLevel); - bottomLevel.appendChild(element); - newTable.appendChild(midLevel); - - - - midLevel = document.createElement("tr"); - bottomLevel = document.createElement("td"); - bottomLevel.align = "center"; var txtNode = document.createTextNode("Animation Speed"); - midLevel.appendChild(bottomLevel); - bottomLevel.appendChild(txtNode); - newTable.appendChild(midLevel); - - - - tableEntry.appendChild(newTable); - + tableEntry.appendChild(txtNode); + tableEntry.appendChild(element); //Append the element in page (in span). controlBar.appendChild(tableEntry); @@ -350,7 +338,15 @@ function initCanvas() { speed = parseInt(speed); } - + var spanMinus = document.createElement("span"); + var iMinus = document.createElement("i"); + iMinus.setAttribute("class", "fas fa-minus-circle"); + spanMinus.appendChild(iMinus); + spanMinus.style.left = "-30px"; + spanMinus.style.top = "-7px"; + spanMinus.style.position = "absolute"; + element.appendChild(spanMinus); + $(element).slider({ animate: true, value: speed, @@ -369,6 +365,16 @@ function initCanvas() element.setAttribute("style", "width:200px"); + var spanPlus = document.createElement("span"); + var iPlus = document.createElement("i"); + iPlus.setAttribute("class", "fas fa-plus-circle"); + spanPlus.appendChild(iPlus); + spanPlus.style.left = "210px"; + spanPlus.style.top = "-7px"; + + spanPlus.style.position = "absolute"; + element.appendChild(spanPlus); + var width=getCookie("VisualizationWidth"); if (width == null || width == "") diff --git a/JavascriptVisualRelease/AnimationLibrary/CustomEvents.js b/JavascriptVisualRelease/AnimationLibrary/CustomEvents.js index 9871734..9eff3c6 100644 --- a/JavascriptVisualRelease/AnimationLibrary/CustomEvents.js +++ b/JavascriptVisualRelease/AnimationLibrary/CustomEvents.js @@ -24,10 +24,14 @@ // authors and should not be interpreted as representing official policies, either expressed // or implied, of the University of San Francisco -document.getElementsByTagName("head")[0].innerHTML +=``; -document.querySelector("body").innerHTML += ` +document.getElementsByTagName("head")[0].innerHTML +=` + + + -`; + + +`; Function.prototype.bind = function() { var _function = this; diff --git a/JavascriptVisualRelease/AnimationLibrary/navigation.js b/JavascriptVisualRelease/AnimationLibrary/navigation.js new file mode 100644 index 0000000..c5c2ff2 --- /dev/null +++ b/JavascriptVisualRelease/AnimationLibrary/navigation.js @@ -0,0 +1,39 @@ +let navToggled = false; +let activateNavigation = ()=>{ + navToggled = true; + if(window.innerWidth > 768){ + document.querySelector('nav').style.width = "25%"; + document.querySelector('main').style.marginLeft = "25%"; + document.querySelector('main').style.width = "auto"; + } + else{ + document.querySelector('nav').style.width = "100%"; + } +}; + +let closeNavigation = () => { + navToggled = false; + document.querySelector('nav').style.width = "0px"; + document.querySelector('main').style.margin = "auto"; + + if(window.innerWidth > 768){ + document.querySelector('main').style.width = "90%"; + } +}; + +document.getElementById('closebtn').addEventListener('click', ()=>{ + closeNavigation(); +}); + +document.getElementById('hamburger').addEventListener('click', ()=>{ + activateNavigation(); +}); + +window.addEventListener('resize', ()=>{ + if(navToggled){ + activateNavigation(); + } + else{ + closeNavigation(); + } +}); \ No newline at end of file diff --git a/JavascriptVisualRelease/BFS.html b/JavascriptVisualRelease/BFS.html index 9501b2e..252044e 100644 --- a/JavascriptVisualRelease/BFS.html +++ b/JavascriptVisualRelease/BFS.html @@ -44,7 +44,123 @@

    Breadth-First Search

    -
    +
    + +
    @@ -60,7 +176,7 @@

    Breadth-First Search

    -
    +
    @@ -70,5 +186,6 @@

    Breadth-First Search

    - - + + + diff --git a/JavascriptVisualRelease/BPlusTree.html b/JavascriptVisualRelease/BPlusTree.html index ffc74e5..a29d273 100644 --- a/JavascriptVisualRelease/BPlusTree.html +++ b/JavascriptVisualRelease/BPlusTree.html @@ -61,7 +61,7 @@

    B+ Trees

    -
    +
    @@ -71,5 +71,6 @@

    B+ Trees

    - - + + + diff --git a/JavascriptVisualRelease/BST.html b/JavascriptVisualRelease/BST.html index 639ce90..b13c4aa 100644 --- a/JavascriptVisualRelease/BST.html +++ b/JavascriptVisualRelease/BST.html @@ -42,9 +42,123 @@ -
    + +
    @@ -58,7 +172,7 @@

    Binary Search Tree

    -
    +
    @@ -68,5 +182,6 @@

    Binary Search Tree

    - - + + + diff --git a/JavascriptVisualRelease/BTree.html b/JavascriptVisualRelease/BTree.html index a8c3163..a6d7bf7 100644 --- a/JavascriptVisualRelease/BTree.html +++ b/JavascriptVisualRelease/BTree.html @@ -62,7 +62,7 @@

    B-Trees

    -
    +
    @@ -72,5 +72,6 @@

    B-Trees

    - - + + + diff --git a/JavascriptVisualRelease/BinomialQueue.html b/JavascriptVisualRelease/BinomialQueue.html index 0124e91..c1c2128 100644 --- a/JavascriptVisualRelease/BinomialQueue.html +++ b/JavascriptVisualRelease/BinomialQueue.html @@ -43,7 +43,123 @@

    Binomial Queue

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Binomial Queue

    -
    +
    @@ -69,5 +185,6 @@

    Binomial Queue

    - - + + + diff --git a/JavascriptVisualRelease/BucketSort.html b/JavascriptVisualRelease/BucketSort.html index aa83d4f..9872a55 100644 --- a/JavascriptVisualRelease/BucketSort.html +++ b/JavascriptVisualRelease/BucketSort.html @@ -43,8 +43,125 @@

    Bucket Sort

    -
    - +
    + + +
    @@ -58,7 +175,7 @@

    Bucket Sort

    -
    +
    @@ -68,5 +185,6 @@

    Bucket Sort

    - - + + + diff --git a/JavascriptVisualRelease/ChangingCoordinates2D.html b/JavascriptVisualRelease/ChangingCoordinates2D.html index f1116fe..f3f3f21 100644 --- a/JavascriptVisualRelease/ChangingCoordinates2D.html +++ b/JavascriptVisualRelease/ChangingCoordinates2D.html @@ -43,7 +43,123 @@

    Changing Coordinate Spaces

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Changing Coordinate Spaces

    -
    +
    @@ -69,5 +185,6 @@

    Changing Coordinate Spaces

    - - + + + diff --git a/JavascriptVisualRelease/ChangingCoordinates3D.html b/JavascriptVisualRelease/ChangingCoordinates3D.html index 3347798..74727e5 100644 --- a/JavascriptVisualRelease/ChangingCoordinates3D.html +++ b/JavascriptVisualRelease/ChangingCoordinates3D.html @@ -43,7 +43,123 @@

    Changing Coordinate Spaces (3D)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Changing Coordinate Spaces (3D)

    -
    +
    @@ -69,5 +185,6 @@

    Changing Coordinate Spaces (3D)

    - - + + + diff --git a/JavascriptVisualRelease/ClosedHash.html b/JavascriptVisualRelease/ClosedHash.html index 8826688..f2f647a 100644 --- a/JavascriptVisualRelease/ClosedHash.html +++ b/JavascriptVisualRelease/ClosedHash.html @@ -45,7 +45,123 @@

    Closed Hashing

    -
    +
    + +
    @@ -61,7 +177,7 @@

    Closed Hashing

    -
    +
    @@ -71,5 +187,6 @@

    Closed Hashing

    - - + + + diff --git a/JavascriptVisualRelease/ClosedHashBucket.html b/JavascriptVisualRelease/ClosedHashBucket.html index ab89d64..59450a0 100644 --- a/JavascriptVisualRelease/ClosedHashBucket.html +++ b/JavascriptVisualRelease/ClosedHashBucket.html @@ -40,12 +40,11 @@
    - -
    +
    @@ -61,7 +60,7 @@

    Closed Hashing, Using Buckets

    -
    +
    @@ -71,5 +70,6 @@

    Closed Hashing, Using Buckets

    - - + + + diff --git a/JavascriptVisualRelease/ComparisonSort.html b/JavascriptVisualRelease/ComparisonSort.html index f1a1fbe..62987d9 100644 --- a/JavascriptVisualRelease/ComparisonSort.html +++ b/JavascriptVisualRelease/ComparisonSort.html @@ -53,7 +53,7 @@

    Comparison Sorting Algorithms

    -
    +
    @@ -64,5 +64,6 @@

    Comparison Sorting Algorithms

    - - + + + diff --git a/JavascriptVisualRelease/ConnectedComponent.html b/JavascriptVisualRelease/ConnectedComponent.html index ee6b95d..9d6ec13 100644 --- a/JavascriptVisualRelease/ConnectedComponent.html +++ b/JavascriptVisualRelease/ConnectedComponent.html @@ -45,7 +45,123 @@

    Connected Components

    -
    +
    + +
    @@ -61,7 +177,7 @@

    Connected Components

    -
    +
    @@ -71,5 +187,6 @@

    Connected Components

    - - + + + diff --git a/JavascriptVisualRelease/CountingSort.html b/JavascriptVisualRelease/CountingSort.html index a86dfd9..444fd29 100644 --- a/JavascriptVisualRelease/CountingSort.html +++ b/JavascriptVisualRelease/CountingSort.html @@ -44,7 +44,123 @@

    Counting Sort

    -
    +
    + +
    @@ -56,7 +172,7 @@

    Counting Sort

    -
    +
    @@ -72,5 +188,6 @@

    Counting Sort

    - - + + + diff --git a/JavascriptVisualRelease/DFS.html b/JavascriptVisualRelease/DFS.html index 14404b5..a0a07f3 100644 --- a/JavascriptVisualRelease/DFS.html +++ b/JavascriptVisualRelease/DFS.html @@ -45,7 +45,123 @@

    Depth-First Search

    -
    +
    + +
    @@ -61,7 +177,7 @@

    Depth-First Search

    -
    +
    @@ -71,5 +187,6 @@

    Depth-First Search

    - - + + + diff --git a/JavascriptVisualRelease/DPChange.html b/JavascriptVisualRelease/DPChange.html index ba6da0f..f955ba1 100644 --- a/JavascriptVisualRelease/DPChange.html +++ b/JavascriptVisualRelease/DPChange.html @@ -43,7 +43,123 @@

    Dynamic Programming (Making Change)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Dynamic Programming (Making Change)

    -
    +
    @@ -69,5 +185,6 @@

    Dynamic Programming (Making Change)

    - - + + + diff --git a/JavascriptVisualRelease/DPFib.html b/JavascriptVisualRelease/DPFib.html index 9ec311d..5745532 100644 --- a/JavascriptVisualRelease/DPFib.html +++ b/JavascriptVisualRelease/DPFib.html @@ -43,7 +43,123 @@

    Dynamic Programming (Fibonacci)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Dynamic Programming (Fibonacci)

    -
    +
    @@ -69,5 +185,6 @@

    Dynamic Programming (Fibonacci)

    - - + + + diff --git a/JavascriptVisualRelease/DPLCS.html b/JavascriptVisualRelease/DPLCS.html index 6efc976..3fd9fe0 100644 --- a/JavascriptVisualRelease/DPLCS.html +++ b/JavascriptVisualRelease/DPLCS.html @@ -43,7 +43,123 @@

    Dynamic Programming (Longest Common Subsequence)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Dynamic Programming (Longest Common Subsequence)

    -
    +
    @@ -69,5 +185,6 @@

    Dynamic Programming (Longest Common Subsequence)

    - - + + + diff --git a/JavascriptVisualRelease/Dijkstra.html b/JavascriptVisualRelease/Dijkstra.html index ac4b9cb..ee5567f 100644 --- a/JavascriptVisualRelease/Dijkstra.html +++ b/JavascriptVisualRelease/Dijkstra.html @@ -45,7 +45,123 @@

    Dijkstra Shortest Path

    -
    +
    + +
    @@ -61,7 +177,7 @@

    Dijkstra Shortest Path

    -
    +
    @@ -71,5 +187,6 @@

    Dijkstra Shortest Path

    - - + + + diff --git a/JavascriptVisualRelease/DisjointSets.html b/JavascriptVisualRelease/DisjointSets.html index befd351..8fde82c 100644 --- a/JavascriptVisualRelease/DisjointSets.html +++ b/JavascriptVisualRelease/DisjointSets.html @@ -43,7 +43,123 @@

    Disjoint Sets

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Disjoint Sets

    -
    +
    @@ -69,5 +185,6 @@

    Disjoint Sets

    - - + + + diff --git a/JavascriptVisualRelease/FibonacciHeap.html b/JavascriptVisualRelease/FibonacciHeap.html index ea6d5b6..be66beb 100644 --- a/JavascriptVisualRelease/FibonacciHeap.html +++ b/JavascriptVisualRelease/FibonacciHeap.html @@ -43,7 +43,123 @@

    Fibonacci Heap

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Fibonacci Heap

    -
    +
    @@ -69,5 +185,6 @@

    Fibonacci Heap

    - - + + + diff --git a/JavascriptVisualRelease/Floyd.html b/JavascriptVisualRelease/Floyd.html index 031ca95..8d7aaa5 100644 --- a/JavascriptVisualRelease/Floyd.html +++ b/JavascriptVisualRelease/Floyd.html @@ -44,7 +44,123 @@

    Floyd-Warshall All-Pairs Shortest Path

    -
    +
    + +
    @@ -60,7 +176,7 @@

    Floyd-Warshall All-Pairs Shortest Path

    -
    +
    @@ -70,5 +186,6 @@

    Floyd-Warshall All-Pairs Shortest Path

    - - + + + diff --git a/JavascriptVisualRelease/Heap.html b/JavascriptVisualRelease/Heap.html index 7e5a34a..dbe0a1f 100644 --- a/JavascriptVisualRelease/Heap.html +++ b/JavascriptVisualRelease/Heap.html @@ -43,7 +43,123 @@

    Min Heap

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Min Heap

    -
    +
    @@ -69,5 +185,6 @@

    Min Heap

    - - + + + diff --git a/JavascriptVisualRelease/HeapSort.html b/JavascriptVisualRelease/HeapSort.html index 19777e2..377189b 100644 --- a/JavascriptVisualRelease/HeapSort.html +++ b/JavascriptVisualRelease/HeapSort.html @@ -42,7 +42,123 @@

    Heap Sort

    -
    +
    + +
    @@ -58,7 +174,7 @@

    Heap Sort

    -
    +
    @@ -68,5 +184,6 @@

    Heap Sort

    - - + + + diff --git a/JavascriptVisualRelease/Kruskal.html b/JavascriptVisualRelease/Kruskal.html index 741f3a2..2baa072 100644 --- a/JavascriptVisualRelease/Kruskal.html +++ b/JavascriptVisualRelease/Kruskal.html @@ -44,7 +44,123 @@

    Kruskal Minimum Cost Spanning Treeh

    -
    +
    + +
    @@ -60,7 +176,7 @@

    Kruskal Minimum Cost Spanning Treeh

    -
    +
    @@ -70,5 +186,6 @@

    Kruskal Minimum Cost Spanning Treeh

    - - + + + diff --git a/JavascriptVisualRelease/LeftistHeap.html b/JavascriptVisualRelease/LeftistHeap.html index b180a21..a22bfc4 100644 --- a/JavascriptVisualRelease/LeftistHeap.html +++ b/JavascriptVisualRelease/LeftistHeap.html @@ -43,7 +43,123 @@

    Leftist Heap

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Leftist Heap

    -
    +
    @@ -69,5 +185,6 @@

    Leftist Heap

    - - + + + diff --git a/JavascriptVisualRelease/OpenHash.html b/JavascriptVisualRelease/OpenHash.html index 0b51a36..f965970 100644 --- a/JavascriptVisualRelease/OpenHash.html +++ b/JavascriptVisualRelease/OpenHash.html @@ -44,7 +44,123 @@

    Open Hashing

    -
    +
    + +
    @@ -60,7 +176,7 @@

    Open Hashing

    -
    +
    @@ -70,5 +186,6 @@

    Open Hashing

    - - + + + diff --git a/JavascriptVisualRelease/Prim.html b/JavascriptVisualRelease/Prim.html index 26115c5..4d75715 100644 --- a/JavascriptVisualRelease/Prim.html +++ b/JavascriptVisualRelease/Prim.html @@ -44,7 +44,123 @@

    Prim Minimum Cost Spanning Treeh

    -
    +
    + +
    @@ -60,7 +176,7 @@

    Prim Minimum Cost Spanning Treeh

    -
    +
    @@ -70,5 +186,6 @@

    Prim Minimum Cost Spanning Treeh

    - - + + + diff --git a/JavascriptVisualRelease/QueueArray.html b/JavascriptVisualRelease/QueueArray.html index 7113f08..6db1740 100644 --- a/JavascriptVisualRelease/QueueArray.html +++ b/JavascriptVisualRelease/QueueArray.html @@ -43,7 +43,123 @@

    Queue (Array Implementaion)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Queue (Array Implementaion)

    -
    +
    @@ -69,5 +185,6 @@

    Queue (Array Implementaion)

    - - + + + diff --git a/JavascriptVisualRelease/QueueLL.html b/JavascriptVisualRelease/QueueLL.html index c221f65..4248dcc 100644 --- a/JavascriptVisualRelease/QueueLL.html +++ b/JavascriptVisualRelease/QueueLL.html @@ -43,7 +43,123 @@

    Queue (Linked List Implementaion)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Queue (Linked List Implementaion)

    -
    +
    @@ -69,5 +185,6 @@

    Queue (Linked List Implementaion)

    - - + + + diff --git a/JavascriptVisualRelease/RadixSort.html b/JavascriptVisualRelease/RadixSort.html index b057a13..6e4e2e5 100644 --- a/JavascriptVisualRelease/RadixSort.html +++ b/JavascriptVisualRelease/RadixSort.html @@ -43,7 +43,123 @@

    Radix Sort

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Radix Sort

    -
    +
    @@ -69,5 +185,6 @@

    Radix Sort

    - - + + + diff --git a/JavascriptVisualRelease/RadixTree.html b/JavascriptVisualRelease/RadixTree.html index 947f296..481f20b 100644 --- a/JavascriptVisualRelease/RadixTree.html +++ b/JavascriptVisualRelease/RadixTree.html @@ -57,7 +57,7 @@

    Radix Tree

    -
    +
    @@ -67,5 +67,6 @@

    Radix Tree

    - - + + + diff --git a/JavascriptVisualRelease/RecFact.html b/JavascriptVisualRelease/RecFact.html index b743782..a302a9e 100644 --- a/JavascriptVisualRelease/RecFact.html +++ b/JavascriptVisualRelease/RecFact.html @@ -44,7 +44,123 @@

    Recursive Factorial

    -
    +
    + +
    @@ -60,7 +176,7 @@

    Recursive Factorial

    -
    +
    @@ -70,5 +186,6 @@

    Recursive Factorial

    - - + + + diff --git a/JavascriptVisualRelease/RecQueens.html b/JavascriptVisualRelease/RecQueens.html index 70dd824..bdadeb1 100644 --- a/JavascriptVisualRelease/RecQueens.html +++ b/JavascriptVisualRelease/RecQueens.html @@ -44,7 +44,123 @@

    Recursive N-Queens

    -
    +
    + +
    @@ -60,7 +176,7 @@

    Recursive N-Queens

    -
    +
    @@ -70,5 +186,6 @@

    Recursive N-Queens

    - - + + + diff --git a/JavascriptVisualRelease/RecReverse.html b/JavascriptVisualRelease/RecReverse.html index c78dcef..a91433e 100644 --- a/JavascriptVisualRelease/RecReverse.html +++ b/JavascriptVisualRelease/RecReverse.html @@ -44,7 +44,123 @@

    Recursive Reverse

    -
    +
    + +
    @@ -60,7 +176,7 @@

    Recursive Reverse

    -
    +
    @@ -70,5 +186,6 @@

    Recursive Reverse

    - - + + + diff --git a/JavascriptVisualRelease/RedBlack.html b/JavascriptVisualRelease/RedBlack.html index 3a7898b..14d3f5b 100644 --- a/JavascriptVisualRelease/RedBlack.html +++ b/JavascriptVisualRelease/RedBlack.html @@ -43,7 +43,123 @@

    Red/Black Tree

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Red/Black Tree

    -
    +
    @@ -69,5 +185,6 @@

    Red/Black Tree

    - - + + + diff --git a/JavascriptVisualRelease/RotateScale2D.html b/JavascriptVisualRelease/RotateScale2D.html index eda8ebc..dd430e5 100644 --- a/JavascriptVisualRelease/RotateScale2D.html +++ b/JavascriptVisualRelease/RotateScale2D.html @@ -43,7 +43,123 @@

    Rotation and Scaling (2D)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Rotation and Scaling (2D)

    -
    +
    @@ -69,5 +185,6 @@

    Rotation and Scaling (2D)

    - - + + + diff --git a/JavascriptVisualRelease/RotateScale3D.html b/JavascriptVisualRelease/RotateScale3D.html index edd150a..057c12b 100644 --- a/JavascriptVisualRelease/RotateScale3D.html +++ b/JavascriptVisualRelease/RotateScale3D.html @@ -43,7 +43,123 @@

    Rotation and Scaling (3D)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Rotation and Scaling (3D)

    -
    +
    @@ -69,5 +185,6 @@

    Rotation and Scaling (3D)

    - - + + + diff --git a/JavascriptVisualRelease/RotateTranslate2D.html b/JavascriptVisualRelease/RotateTranslate2D.html index 07cef7f..692ccf6 100644 --- a/JavascriptVisualRelease/RotateTranslate2D.html +++ b/JavascriptVisualRelease/RotateTranslate2D.html @@ -43,7 +43,123 @@

    Rotation and Translation (2D)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Rotation and Translation (2D)

    -
    +
    @@ -69,5 +185,6 @@

    Rotation and Translation (2D)

    - - + + + diff --git a/JavascriptVisualRelease/Search.html b/JavascriptVisualRelease/Search.html index cd6dd95..b8e7e73 100644 --- a/JavascriptVisualRelease/Search.html +++ b/JavascriptVisualRelease/Search.html @@ -43,7 +43,123 @@

    Searching Sorted List

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Searching Sorted List

    -
    +
    @@ -69,5 +185,6 @@

    Searching Sorted List

    - - + + + diff --git a/JavascriptVisualRelease/SimpleStack.html b/JavascriptVisualRelease/SimpleStack.html index e793ee8..a7a69f5 100644 --- a/JavascriptVisualRelease/SimpleStack.html +++ b/JavascriptVisualRelease/SimpleStack.html @@ -43,7 +43,123 @@

    Simple Stack

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Simple Stack

    -
    +
    @@ -69,5 +185,6 @@

    Simple Stack

    - - + + + diff --git a/JavascriptVisualRelease/SkewHeap.html b/JavascriptVisualRelease/SkewHeap.html index 176bdef..864428a 100644 --- a/JavascriptVisualRelease/SkewHeap.html +++ b/JavascriptVisualRelease/SkewHeap.html @@ -43,7 +43,123 @@

    Skew Heap

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Skew Heap

    -
    +
    @@ -69,5 +185,6 @@

    Skew Heap

    - - + + + diff --git a/JavascriptVisualRelease/SplayTree.html b/JavascriptVisualRelease/SplayTree.html index caa5de3..44b16b8 100644 --- a/JavascriptVisualRelease/SplayTree.html +++ b/JavascriptVisualRelease/SplayTree.html @@ -43,7 +43,123 @@

    Splay Tree

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Splay Tree

    -
    +
    @@ -69,5 +185,6 @@

    Splay Tree

    - - + + + diff --git a/JavascriptVisualRelease/StackArray.html b/JavascriptVisualRelease/StackArray.html index 7fa6c82..d0dbd9f 100644 --- a/JavascriptVisualRelease/StackArray.html +++ b/JavascriptVisualRelease/StackArray.html @@ -43,7 +43,123 @@

    Stack (Array Implementaion)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Stack (Array Implementaion)

    -
    +
    @@ -69,5 +185,6 @@

    Stack (Array Implementaion)

    - - + + + diff --git a/JavascriptVisualRelease/StackLL.html b/JavascriptVisualRelease/StackLL.html index fa90d8f..44f61b6 100644 --- a/JavascriptVisualRelease/StackLL.html +++ b/JavascriptVisualRelease/StackLL.html @@ -43,7 +43,123 @@

    Stack (Linked List Implementaion)

    -
    +
    + +
    @@ -59,7 +175,7 @@

    Stack (Linked List Implementaion)

    -
    +
    @@ -69,5 +185,6 @@

    Stack (Linked List Implementaion)

    - - + + + diff --git a/JavascriptVisualRelease/TST.html b/JavascriptVisualRelease/TST.html index cf7c5bf..fdf6900 100644 --- a/JavascriptVisualRelease/TST.html +++ b/JavascriptVisualRelease/TST.html @@ -57,7 +57,7 @@

    Ternary Search Tree (Trie with BST of children)

    -
    +
    @@ -67,5 +67,6 @@

    Ternary Search Tree (Trie with BST of children)

    - - + + + diff --git a/JavascriptVisualRelease/TopoSortDFS.html b/JavascriptVisualRelease/TopoSortDFS.html index 9566fda..90a8576 100644 --- a/JavascriptVisualRelease/TopoSortDFS.html +++ b/JavascriptVisualRelease/TopoSortDFS.html @@ -45,7 +45,123 @@

    Topological Sort (DFS)

    -
    +
    + +
    @@ -61,7 +177,7 @@

    Topological Sort (DFS)

    -
    +
    @@ -71,5 +187,6 @@

    Topological Sort (DFS)

    - - + + + diff --git a/JavascriptVisualRelease/TopoSortIndegree.html b/JavascriptVisualRelease/TopoSortIndegree.html index b0ddff2..422ec16 100644 --- a/JavascriptVisualRelease/TopoSortIndegree.html +++ b/JavascriptVisualRelease/TopoSortIndegree.html @@ -45,7 +45,123 @@

    Topological Sort (Indegree)

    -
    +
    + +
    @@ -61,7 +177,7 @@

    Topological Sort (Indegree)

    -
    +
    @@ -71,5 +187,6 @@

    Topological Sort (Indegree)

    - - + + + diff --git a/JavascriptVisualRelease/Trie.html b/JavascriptVisualRelease/Trie.html index 9c8efb4..48eeb87 100644 --- a/JavascriptVisualRelease/Trie.html +++ b/JavascriptVisualRelease/Trie.html @@ -57,7 +57,7 @@

    Trie (Prefix Tree)

    -
    +
    @@ -67,5 +67,6 @@

    Trie (Prefix Tree)

    - - + + + diff --git a/JavascriptVisualRelease/about.html b/JavascriptVisualRelease/about.html index 14825e7..0d2491c 100644 --- a/JavascriptVisualRelease/about.html +++ b/JavascriptVisualRelease/about.html @@ -92,7 +92,7 @@

    General Animation Controls

    Java/Swing Version

    -This work is based on visualizations that we created in Java using Swing -- that code is still available here, +This work is based on visualizations that we created in Java using Swing -- that code is still available here, though that code is no longer being maintained. There are a few algorithms that we have not yet ported to the new system, so the older version may still be of use. diff --git a/JavascriptVisualRelease/template.html b/JavascriptVisualRelease/template.html index f4d3725..0f4cb40 100644 --- a/JavascriptVisualRelease/template.html +++ b/JavascriptVisualRelease/template.html @@ -42,7 +42,123 @@

    Place your Header here

    -
    +
    + +
    @@ -58,7 +174,7 @@

    Place your Header here

    -
    +
    @@ -68,5 +184,6 @@

    Place your Header here

    - - \ No newline at end of file + + + \ No newline at end of file diff --git a/JavascriptVisualRelease/visualizationPageStyle.css b/JavascriptVisualRelease/visualizationPageStyle.css index 937204b..2ec1592 100644 --- a/JavascriptVisualRelease/visualizationPageStyle.css +++ b/JavascriptVisualRelease/visualizationPageStyle.css @@ -29,7 +29,7 @@ body { .VisualizationMainPage #algoControlSection { - background: #DDEEDD; + background: rgba(124, 160, 174, 0.25)!important;; color:#000000; } @@ -37,14 +37,59 @@ body { .VisualizationMainPage #generalAnimationControlSection { - background: #DDEEDD; + background: rgb(124, 160, 174, 0.25)!important;; color:#006600; } - +/* code snippet inspired from https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_sidenav_push*/ +nav { + height: 100%; + position: fixed; + z-index: 3; + top: 0; + left: 0; + padding-top: 1em; + overflow-x: hidden; + background-color: #2a9d8f; + text-align: center; + width: 0; + transition: 0.5s; + } + nav li{ + list-style-type: none; + } + nav a { + color: #f2f2f2; + text-decoration: none; + font-size: 1.5em; + display: block; + padding: 8px 8px 8px 32px; + } + + h6 { + font-size: 0.8em; + } + + #hamburger { + text-decoration: none; + width: auto; + font-size: 2em; + display: block; + padding: 1em; + color:black; + } + + #closebtn { + position: absolute; + top: 0; + right: 25px; + margin-left: 50px; + z-index:10; + } .VisualizationMainPage #header { - background: #006633; - color:#ffCC33; + background: rgb(124, 160, 174); + color:black; + text-align:center; padding: 0 10px 0 20px; } @@ -79,7 +124,7 @@ body { .VisualizationMainPage #footer A:link { text-decoration:none; - color:#ffCC33; + color:black; } @@ -102,18 +147,53 @@ body { background: #FFFFFF; color:#006633 } - +body{ + background-color: rgb(124, 160, 174)!important; +} .VisualizationMainPage #footer { padding: 0 10px; - background: #006633; color:#ffcc33; } .VisualizationMainPage #footer p { margin: 0; padding: 10px 0; } +#GeneralAnimationControls{ + display:grid; + grid-template-columns: auto; + padding:1em; +} +#GeneralAnimationControls > div{ + margin-left:2em; +} +#footer{ + background-color:rgb(124, 160, 174)!important; + color: black; + width:100%; +} +#canvas{ + width:100%; + margin:auto; +} + EM {text-decoration: bold;} +@media all and (min-width:768px){ + #GeneralAnimationControls{ + grid-template-columns: auto auto; + } + nav { + text-align: left; + } + #hamburger { + position: relative; + top: 1em; + left: 1em; + padding: 0; + display: inline; + } +} + diff --git a/styles/styles.css b/styles/styles.css index 2ed198a..ec1c093 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -4,4 +4,4 @@ body{ #canvas{ width: 100%!important; height: 100%!important; -} \ No newline at end of file +} From c3d1fa9049110deab721cc963788234f3c243f24 Mon Sep 17 00:00:00 2001 From: AdiChops Date: Sun, 2 May 2021 18:38:24 -0400 Subject: [PATCH 2/2] added missing navs --- JavascriptVisualRelease/BPlusTree.html | 116 +++++++++++++++++ JavascriptVisualRelease/BST.html | 118 +++++++++++++++++- JavascriptVisualRelease/ClosedHashBucket.html | 116 +++++++++++++++++ JavascriptVisualRelease/ComparisonSort.html | 116 +++++++++++++++++ JavascriptVisualRelease/RadixTree.html | 116 +++++++++++++++++ JavascriptVisualRelease/TST.html | 116 +++++++++++++++++ JavascriptVisualRelease/Trie.html | 116 +++++++++++++++++ .../visualizationPageStyle.css | 8 +- 8 files changed, 819 insertions(+), 3 deletions(-) diff --git a/JavascriptVisualRelease/BPlusTree.html b/JavascriptVisualRelease/BPlusTree.html index a29d273..8bed8fc 100644 --- a/JavascriptVisualRelease/BPlusTree.html +++ b/JavascriptVisualRelease/BPlusTree.html @@ -47,6 +47,122 @@

    B+ Trees

    + +
    diff --git a/JavascriptVisualRelease/BST.html b/JavascriptVisualRelease/BST.html index b13c4aa..03a2402 100644 --- a/JavascriptVisualRelease/BST.html +++ b/JavascriptVisualRelease/BST.html @@ -43,7 +43,123 @@

    Binary Search Tree

    - + + +