diff options
author | Valerio Virgillito | 2012-03-27 12:06:29 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-03-27 12:06:29 -0700 |
commit | 675fffb08f570783f055471501f94fc273de2b9e (patch) | |
tree | 215b54eee4d6f982809087c59cf8f1d37b2f4350 /js/tools | |
parent | 73ae65902d355fcb75bcdb486eaa27c0d79125c8 (diff) | |
parent | 0a06e17da5759c29b63c32118c7f2b14452380b1 (diff) | |
download | ninja-675fffb08f570783f055471501f94fc273de2b9e.tar.gz |
Merge pull request #146 from mqg734/WebGLFileIO
Fixes for Line Tool and EyeDropper tool runtime error.
Diffstat (limited to 'js/tools')
-rwxr-xr-x | js/tools/EyedropperTool.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/js/tools/EyedropperTool.js b/js/tools/EyedropperTool.js index 7458a9e8..d627f03b 100755 --- a/js/tools/EyedropperTool.js +++ b/js/tools/EyedropperTool.js | |||
@@ -395,9 +395,12 @@ exports.EyedropperTool = Montage.create(toolBase, { | |||
395 | this._webGlWorld.importJSON(worldData); | 395 | this._webGlWorld.importJSON(worldData); |
396 | this._webGlWorld.render(); | 396 | this._webGlWorld.render(); |
397 | setTimeout(function() { | 397 | setTimeout(function() { |
398 | this._webGlWorld.draw(); | 398 | if(this._webGlWorld) |
399 | this._imageDataContext.drawImage(this._webGlDataCanvas, 0, 0); | 399 | { |
400 | return this._getColorFromCanvas(this._imageDataContext, tmpPt, true); | 400 | this._webGlWorld.draw(); |
401 | this._imageDataContext.drawImage(this._webGlDataCanvas, 0, 0); | ||
402 | return this._getColorFromCanvas(this._imageDataContext, tmpPt, true); | ||
403 | } | ||
401 | }.bind(this), 250); | 404 | }.bind(this), 250); |
402 | } | 405 | } |
403 | } | 406 | } |