diff --git a/data/episodes.csv b/data/episodes.csv index adb39ac..d69e288 100644 --- a/data/episodes.csv +++ b/data/episodes.csv @@ -7,7 +7,7 @@ season,episode,title,awoiaf,wikipedia 1,6,A Golden Crown,A_Golden_Crown, 1,7,You Win or You Die,You_Win_or_You_Die, 1,8,The Pointy End,The_Pointy_End, -1,9,Baelor,Baelor, +1,9,Baelor,Baelor_(TV), 1,10,Fire and Blood,Fire_and_Blood_(Game_of_Thrones), 2,1,The North Remembers,The_North_Remembers_(TV), 2,2,The Night Lands,The_Night_Lands_(TV), @@ -58,4 +58,4 @@ season,episode,title,awoiaf,wikipedia 6,7,The Broken Man,,The_Broken_Man 6,8,No One,,No_One_(Game_of_Thrones) 6,9,Battle of the Bastards,,Battle_of_the_Bastards -6,10,The Winds of Winter,,The_Winds_of_Winter_(Game_of_Thrones) \ No newline at end of file +6,10,The Winds of Winter,,The_Winds_of_Winter_(Game_of_Thrones) diff --git a/index.html b/index.html index 7c46f52..4d78807 100644 --- a/index.html +++ b/index.html @@ -67,10 +67,14 @@ - + + @@ -195,7 +199,7 @@ {{character.name}} diff --git a/js/controller.js b/js/controller.js index 71b30f2..d28ce97 100644 --- a/js/controller.js +++ b/js/controller.js @@ -15,7 +15,7 @@ angular.module('quartermaester') houseHeraldry: false, geographicRegions: false, politicalAllegiances: false, - characters: [] + characters: {} }; $scope.map = { center: { @@ -36,7 +36,7 @@ angular.module('quartermaester') smgMapType: smgMapType, locationClick: locationClick, heraldryClick: heraldryClick, - characterClick: heraldryClick + characterClick: characterClick }; $scope.mapModels = { towns: [], @@ -75,6 +75,10 @@ angular.module('quartermaester') $scope.$watch('slider', refreshMap, true); $scope.$watch('options', refreshMap, true); + for (var i=0;i=0; bookId--) { + var prologue = parseInt(qmData.books[bookId].precedingChapters, 10); + if (prologue > $scope.slider[measure]-1) continue; + $scope.slider[measure] = prologue; + break; + } + } break; case -1: if ($scope.slider[measure]>0) $scope.slider[measure]--; @@ -112,21 +125,32 @@ angular.module('quartermaester') if ($scope.slider[measure] inputArray[i].timing[slider.show][1]) continue; + if (typeof options !== "undefined" && typeof inputArray[i].character.key !== "undefined") { + if (!options.characters[ inputArray[i].character.key ]) continue; + } outputArray.push(inputArray[i]); }