Skip to content

Commit aa64e21

Browse files
committed
add force redraw step in scene2d.plot
1 parent 2d7a8d2 commit aa64e21

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plots/gl2d/scene2d.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ proto.toImage = function(format) {
166166
if(this.staticPlot) this.container.appendChild(STATIC_CANVAS);
167167

168168
// force redraw
169-
this.glplot.setDirty(true);
169+
this.glplot.setDirty();
170170
this.glplot.draw();
171171

172172
// grab context and yank out pixels
@@ -408,6 +408,9 @@ proto.plot = function(fullData, fullLayout) {
408408

409409
options.merge(fullLayout);
410410
glplot.update(options);
411+
412+
// force redraw so that promise is returned when rendering is completed
413+
this.glplot.draw();
411414
};
412415

413416
proto.draw = function() {

0 commit comments

Comments
 (0)