Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 29feffb

Browse files
committed
Bug fix: image and processing still need Sk.canvas fixes #76
1 parent de355df commit 29feffb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

runestone/activecode/js/activecode.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ ActiveCode.prototype.createOutput = function () {
208208
$(this.output).css("visibility","hidden");
209209

210210
this.graphics = document.createElement('div');
211+
this.graphics.id = this.divid + "_graphics";
211212
$(this.graphics).addClass("ac-canvas");
212213
// This bit of magic adds an event which waits for a canvas child to be created on our
213214
// newly created div. When a canvas child is added we add a new class so that the visible
@@ -629,6 +630,7 @@ ActiveCode.prototype.runProg = function() {
629630
Sk.divid = this.divid;
630631
this.setTimeLimit();
631632
(Sk.TurtleGraphics || (Sk.TurtleGraphics = {})).target = this.graphics;
633+
Sk.canvas = this.graphics.id; //todo: get rid of this here and in image
632634
$(this.runButton).attr('disabled', 'disabled');
633635
$(this.codeDiv).switchClass("col-md-12","col-md-6",{duration:500,queue:false});
634636
$(this.outDiv).show({duration:700,queue:false});

0 commit comments

Comments
 (0)