aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/skpdiff/diff_viewer.js
blob: 338dbdfaef4dc45e4fa09c26cf558afd28a0b42d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function DiffViewController($scope) {
    $scope.differs = [
        {
            "title": "Different Pixels"
        },
        {
            "title": "Perceptual Difference"
        }
    ];
    $scope.sortIndex = 1;
    $scope.records = SkPDiffRecords.records;
    $scope.highlight = function(differName) {
        console.debug(differName);
    }
    $scope.setSortIndex = function(a) {
        $scope.sortIndex = a;
    }
    $scope.sortingDiffer = function(a) {
        console.debug($scope.sortIndex);
        return a.diffs[$scope.sortIndex].result;
    }
}