We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a08dfa commit fd659f2Copy full SHA for fd659f2
test/jasmine/tests/layout_images_test.js
@@ -260,6 +260,22 @@ describe('Layout images', function() {
260
}).then(done);
261
});
262
263
+ it('should update the image position if changed', function(done) {
264
+ var update = {
265
+ 'images[0].x': 0,
266
+ 'images[0].y': 1
267
+ };
268
+
269
+ var img = Plotly.d3.select('image');
270
271
+ expect([+img.attr('x'), +img.attr('y')]).toEqual([1160, -170]);
272
273
+ Plotly.relayout(gd, update).then(function() {
274
+ var newImg = Plotly.d3.select('image');
275
+ expect([+newImg.attr('x'), +newImg.attr('y')]).toEqual([80, 100]);
276
+ }).then(done);
277
+ });
278
279
it('should remove the image tag if an invalid source', function(done) {
280
281
var selection = Plotly.d3.select('image');
0 commit comments