There was an error while loading. Please reload this page.
1 parent b2bfaaa commit 19fe9fbCopy full SHA for 19fe9fb
1 file changed
modules/Layout.js
@@ -257,12 +257,9 @@ Layout.prototype.update = function() {
257
}, "btn": function(l) { "ram";
258
if (l.font && l.font.endsWith("%"))
259
l.font = "Vector"+rnd(gfx.getHeight()*l.font.slice(0,-1)/100);
260
-
261
- var m = l.src
+ var s = l.scale || 1, m = l.src
262
? gfx.imageMetrics("function"==typeof l.src ? l.src() : l.src)
263
: gfx.setFont(l.font||"6x8:2").stringMetrics(l.label);
264
265
- var s = l.scale || 1;
266
l._h = 16 + Math.ceil(m.height * s);
267
l._w = 20 + Math.ceil(m.width * s);
268
}, "img": function(l) {"ram";
0 commit comments