Dev: Support auto scale #32

This commit is contained in:
surunzi
2017-10-06 17:10:07 +08:00
parent c1550c01d9
commit 37dcb1b015
19 changed files with 301 additions and 73 deletions

View File

@@ -3,9 +3,13 @@ function boot(name, cb)
// Need a little delay to make sure width and height of webpack dev server iframe are initialized.
setTimeout(function ()
{
eruda.init({
tool: name === 'settings' ? [] : name
});
var options = {};
if (name)
{
options.tool = name === 'settings' ? [] : name;
}
eruda.init(options);
eruda.show().get().config.set('displaySize', 50);
cb && cb();