Skip to content

Commit fe41c16

Browse files
committed
Add test for pan movement
1 parent b9a1705 commit fe41c16

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/jasmine/tests/click_test.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,5 +728,20 @@ describe('Test click interactions:', function() {
728728
done();
729729
});
730730
});
731+
732+
733+
it('should move the plot when panning', function() {
734+
var start = 100,
735+
end = 300,
736+
plot = gd._fullLayout._plots.xy.plot;
737+
738+
mouseEvent('mousemove', start, start);
739+
mouseEvent('mousedown', start, start);
740+
mouseEvent('mousemove', end, end);
741+
742+
expect(plot.attr('transform')).toBe('translate(250, 280)');
743+
744+
mouseEvent('mouseup', end, end);
745+
});
731746
});
732747
});

0 commit comments

Comments
 (0)