From c001c90cf9001b7285c026f6ee2d044ead19bcfa Mon Sep 17 00:00:00 2001 From: shylinux Date: Fri, 4 Aug 2023 18:19:19 +0800 Subject: [PATCH] add some --- frame.js | 3 ++- plugin/state.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frame.js b/frame.js index e798609f..f0b22c91 100644 --- a/frame.js +++ b/frame.js @@ -226,7 +226,8 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { can.core.CallFunc([sub, chat.ONIMPORT, chat._INIT], {can: sub, msg: msg, cb: function(msg) { action === false || can.onmotion.clear(can, can._action), sub.onappend._action(sub, can.Conf(ice.MSG_ACTION)||msg.Option(ice.MSG_ACTION), action||can._action) action === false || sub.onappend._status(sub, sub.onexport&&sub.onexport.list||msg.Option(ice.MSG_STATUS)), can.user.isMobile || sub.onappend.tools(sub, msg) - can.onmotion.story.auto(can, can._output), can.onappend.style(sub, sub.Conf(ctx.STYLE)) + can.onimport.size(can, can.ConfHeight(), can.ConfWidth(), can.Conf("_auto"), can.Mode()) + can.onappend.style(sub, sub.Conf(ctx.STYLE)), can.onmotion.story.auto(can, can._output) if (can.onimport.size) { if (can.isFullMode() || can.isCmdMode()) { can.onimport.size(can, can.page.height(), can.page.width(), true) } can.onexport.output(sub, msg) } can.base.isFunc(cb) && cb(msg) diff --git a/plugin/state.js b/plugin/state.js index c1834891..ed7ca4d5 100644 --- a/plugin/state.js +++ b/plugin/state.js @@ -41,8 +41,9 @@ Volcanos(chat.ONIMPORT, { can.page.Select(can, input.parentNode, "span.value", function(target) { target.innerText = value }) return input.value = value, can.Update(event, can.Input([], true), cb), input })[0] }, - size: function(can, height, width, auto, mode) { can.Mode(mode), can.ConfHeight(height), can.ConfWidth(width), height -= can.onexport.actionHeight(can)+can.onexport.statusHeight(can) - auto? (can.page.style(can, can._output, html.HEIGHT, "", html.WIDTH, "", html.MAX_HEIGHT, height, html.MAX_WIDTH, width), can.page.style(can, can._target, html.HEIGHT, "", html.WIDTH, "")): + size: function(can, height, width, auto, mode) { + can.Conf("_auto", auto), can.Mode(mode), can.ConfHeight(height), can.ConfWidth(width), height -= can.onexport.actionHeight(can)+can.onexport.statusHeight(can) + auto || auto == undefined? (can.page.style(can, can._output, html.HEIGHT, "", html.WIDTH, "", html.MAX_HEIGHT, height, html.MAX_WIDTH, width), can.page.style(can, can._target, html.HEIGHT, "", html.WIDTH, "")): (can.page.style(can, can._output, html.HEIGHT, height, html.WIDTH, width, html.MAX_HEIGHT, "", html.MAX_WIDTH, ""), can.page.style(can, can._target, html.WIDTH, width)) var sub = can.sub; if (!sub) { return auto } sub.Mode(mode), sub.ConfHeight(height), sub.ConfWidth(width) mode? sub.onlayout[mode](sub, height, width): sub.onlayout._init(sub, height, width); return auto