1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-02-07 17:45:01 +08:00
parent 930db5d3ce
commit 4b2457b105
2 changed files with 4 additions and 3 deletions

View File

@ -764,7 +764,7 @@ Volcanos(chat.ONLAYOUT, {_init: function(can, target) { target = target||can._ro
if (right) { if (right) {
layout.top = top+can.base.Min(height-target.offsetHeight, 0) layout.top = top+can.base.Min(height-target.offsetHeight, 0)
} else if (rect.top-top-rect.height > top+height-rect.top) { } else if (rect.top-top-rect.height > top+height-rect.top) {
layout.top = top+can.base.Min(rect.top-target.offsetHeight, 0), height = rect.top-top layout.top = can.base.Min(rect.top-target.offsetHeight, top)
} }
} }
} }

View File

@ -208,8 +208,9 @@ Volcanos("user", {
can.core.CallFunc(cb, {event: can.request(event, {_handle: ice.TRUE})._event, button: button, data: data, list: list, args: args, input: action}) || action.cancel() can.core.CallFunc(cb, {event: can.request(event, {_handle: ice.TRUE})._event, button: button, data: data, list: list, args: args, input: action}) || action.cancel()
}, _target: ui._target, _engine: function(event, can, button) { action.submit(event, can, button) }, }, _target: ui._target, _engine: function(event, can, button) { action.submit(event, can, button) },
}); });
if (event && event.target) { can.onlayout.figure(event, can, ui._target) if (event && event.target) {
can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, can.getHeaderHeight(can)) can.onlayout.figure(event, can, ui._target)
can.user.isMobile && can.page.style(can, ui._target, html.LEFT, (can.page.width()-ui._target.offsetWidth)/2, html.TOP, can.getHeaderHeight(can))
} else { } else {
can.getActionSize(function(left, top, height) { can.page.style(can, ui._target, html.LEFT, left||0, html.TOP, (height/4||0)) }) can.getActionSize(function(left, top, height) { can.page.style(can, ui._target, html.LEFT, left||0, html.TOP, (height/4||0)) })
} can.onmotion.resize(can, ui._target), can.onmotion.delay(can, function() { action.focus() }, 300) } can.onmotion.resize(can, ui._target), can.onmotion.delay(can, function() { action.focus() }, 300)