1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
root 2024-10-17 12:13:45 +08:00
parent b11fba0426
commit d7c0a536ea
3 changed files with 5 additions and 2 deletions

View File

@ -1181,7 +1181,7 @@ Volcanos(chat.ONMOTION, {
}, },
float: function(can) { var target = can._fields||can._target, sup = can._fields? can.sup: can float: function(can) { var target = can._fields||can._target, sup = can._fields? can.sup: can
var margin = (can.getFooterHeight()||html.ACTION_HEIGHT)+(can.user.isMobile? html.ACTION_HEIGHT: 0)+html.PLUGIN_MARGIN var margin = (can.getFooterHeight()||html.ACTION_HEIGHT)+(can.user.isMobile? html.ACTION_HEIGHT: 0)+html.PLUGIN_MARGIN
var height = can.base.Max(html.FLOAT_HEIGHT, can.page.height()-can.getHeaderHeight()-margin), width = can.base.Max(html.FLOAT_WIDTH, can.page.width()-can.getRiverWidth()-2*html.PLUGIN_MARGIN) var height = can.base.Max(can.Conf("_height")||html.FLOAT_HEIGHT, can.page.height()-can.getHeaderHeight()-margin), width = can.base.Max(can.Conf("_width")||html.FLOAT_WIDTH, can.page.width()-can.getRiverWidth()-2*html.PLUGIN_MARGIN)
sup.onimport.size(sup, height, width, false), can.onappend.style(can, html.FLOAT) sup.onimport.size(sup, height, width, false), can.onappend.style(can, html.FLOAT)
can.onmotion.resize(can, target, function(height, width) { sup.onimport.size(sup, height, width, false) }, can.getHeaderHeight(), can.getRiverWidth()) can.onmotion.resize(can, target, function(height, width) { sup.onimport.size(sup, height, width, false) }, can.getHeaderHeight(), can.getRiverWidth())
var left = can.page.width()-width-html.PLUGIN_MARGIN, top = can.page.height()-height-margin var left = can.page.width()-width-html.PLUGIN_MARGIN, top = can.page.height()-height-margin

View File

@ -1,4 +1,6 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg) { can.db.current = msg.TableDetail() Volcanos(chat.ONIMPORT, {
_init: function(can, msg) { can.db.current = msg.TableDetail()
can.Conf("_width") && can.sup.onimport.size(can.sup, can.Conf("_height"), can.Conf("_width"), false)
can.ui.target = can.page.Appends(can, can._output, [{type: html.IFRAME, src: can.db.current.link, height: can.ConfHeight(), width: can.ConfWidth()}])._target can.ui.target = can.page.Appends(can, can._output, [{type: html.IFRAME, src: can.db.current.link, height: can.ConfHeight(), width: can.ConfWidth()}])._target
can.page.style(can, can._output, "overflow-y", html.HIDDEN) can.page.style(can, can._output, "overflow-y", html.HIDDEN)
can.sup.onexport.link = function() { return can.db.current.link } can.sup.onexport.link = function() { return can.db.current.link }

View File

@ -40,6 +40,7 @@ Volcanos(chat.ONIMPORT, {
var option = can.base.Obj(msg.Option("field.option")) var option = can.base.Obj(msg.Option("field.option"))
msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash }) msg.Table(function(item) { tabs && can.onmotion.cache(can, function() { return tabHash })
var sup = item.space? can._root.Action: can var sup = item.space? can._root.Action: can
height = item._height||height, width = item._width||width
can.onappend._plugin(sup, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub]) can.onappend._plugin(sup, item, {index: item.index, args: can.base.Obj(item.args||item.arg, []), height: height, width: width}, function(sub) { can._plugins = (can._plugins||[]).concat([sub])
sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; sup.run(can.request(event, {pod: item.space}, option), (msg[ice.FIELD_PREFIX]? msg[ice.FIELD_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) } sub.run = function(event, cmds, cb) { var index = msg.Option(ice.MSG_INDEX)||item.index; sup.run(can.request(event, {pod: item.space}, option), (msg[ice.FIELD_PREFIX]? msg[ice.FIELD_PREFIX]: index? [ctx.RUN, index]: []).concat(cmds), cb, true) }
can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, !can.user.isMobile), cb && cb(sub) can.page.ClassList.has(can, sub._target, html.FLOAT)? can.onmotion.float(sub): sub.onimport.size(sub, height, width, !can.user.isMobile), cb && cb(sub)