Redraw the preview in the code app when the tab gets the focus

This commit is contained in:
yflory 2018-10-05 18:05:39 +02:00
parent c127f0a5f6
commit e6379dacd8

View File

@ -8,6 +8,7 @@ define([
'/common/common-util.js',
'/common/common-hash.js',
'/common/modes.js',
'/common/visible.js',
'/customize/messages.js',
'cm/lib/codemirror',
@ -49,6 +50,7 @@ define([
Util,
Hash,
Modes,
Visible,
Messages,
CMeditor)
{
@ -222,6 +224,12 @@ define([
}
});
Visible.onChange(function (visible) {
if (visible) {
drawPreview();
}
});
return {
forceDraw: forceDrawPreview,
draw: drawPreview,