Exemplo n.º 1
0
            }).then(function() {
                for(i = 0; i < 10; i++) {
                    expect(f[i]).toEqual({name: 'frame' + i});
                }

                return Plotly.Queue.redo(gd);
            }).then(validate).catch(fail).then(done);
Exemplo n.º 2
0
            }).then(function() {
                expect(f[5]).toEqual({name: 'frame5', data: [1]});
                expect(f[7]).toEqual({name: 'frame7', data: [2]});
                expect(f[10]).toEqual({name: 'frame10', data: [3]});

                return Plotly.Queue.undo(gd);
            }).then(validate).catch(fail).then(done);
Exemplo n.º 3
0
 }).then(validate).then(function() {
     return Plotly.Queue.undo(gd);
 }).then(function() {
Exemplo n.º 4
0
            }).then(function() {
                expect(f).toEqual([{name: 'frame1'}]);

                return Plotly.Queue.redo(gd);
            }).then(function() {
Exemplo n.º 5
0
            }).then(function() {
                expect(f).toEqual([]);
                expect(Object.keys(h)).toEqual([]);

                return Plotly.Queue.undo(gd);
            }).then(function() {
Exemplo n.º 6
0
            }).then(function() {
                expect(f).toEqual([{name: 'test1', data: ['y']}, {name: 'test2'}]);
                expect(Object.keys(h)).toEqual(['test1', 'test2']);

                return Plotly.Queue.redo(gd);
            }).then(function() {
Exemplo n.º 7
0
            }).then(function() {
                expect(f).toEqual([{name: 'test1'}, {name: 'test2'}, {name: 'test3'}]);
                expect(Object.keys(h)).toEqual(['test1', 'test2', 'test3']);

                return Plotly.Queue.undo(gd);
            }).then(function() {
Exemplo n.º 8
0
            }).then(function() {
                expect(f).toEqual([]);
                expect(h).toEqual({});

                return Plotly.Queue.redo(gd);
            }).then(validate).catch(fail).then(done);
Exemplo n.º 9
0
 Plotly.addFrames(gd, [{name: 'frame 0'}, {name: 'frame 1'}]).then(validate).then(function() {
     return Plotly.Queue.undo(gd);
 }).then(function() {
Exemplo n.º 10
0
 }).then(validateCount(0)).then(function() {
     // Restore:
     return Plotly.Queue.undo(gd);
 }).then(validateCount(n)).then(function() {