Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script>

/* UNCOMMENT FOR DRAG AND DROP
drag and drob and clicking don't work well together currently

$(function() {
$( "#sortable" ).sortable();
$( "#sortable" ).disableSelection();
});
*/


$(function() {
$('#header').load('../header.html');
Expand Down
4 changes: 4 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2050,6 +2050,10 @@ angular.module('storygenApp', [])
storygen.icons.push({'path':path, 'color':color});
};
}else{
var newList = $('#sortable').children().toArray().map(icon => ({'path': $(icon).attr('src'), color: $(icon).css('background-color')}))
index = newList.findIndex(icon => icon.path === storygen.icons[index].path)
storygen.icons = newList

// REGENERATE INDIVIDUAL IMAGES
if (angular.element(index).hasClass("ui-sortable-helper")) {
console.log("Do nothing!"); // DO NOTHING IF THE IMAGE IS BEING DRAGGED ...theoretically
Expand Down