1
0
forked from x/volcanos
This commit is contained in:
harveyshao 2022-02-14 16:04:07 +08:00
parent 1dcae093d8
commit d1b5111f5f

View File

@ -178,13 +178,11 @@ Volcanos("ondetail", {help: "用户交互", list: [],
}, },
figure: function(can, sub, msg, cb) { figure: function(can, sub, msg, cb) {
can.getActionSize(function(left, top, width, height) { left = left||0 can.getActionSize(function(left, top, width, height) { left = left||0
var top = 120, margin = 20; if (can.user.isMobile) { margin = 0 var top = 120; if (can.user.isMobile) { top = can.user.isLandscape()? 24: 48 }
top = can.user.isLandscape()? 24: 48
}
if (height > window.innerHeight) { height = window.innerHeight-top } if (height > window.innerHeight) { height = window.innerHeight-top }
can.onmotion.move(can, sub._target, {position: html.FIXED, left: left+margin, top: top}) can.onmotion.move(can, sub._target, {position: html.FIXED, left: left, top: top})
sub.ConfHeight(height-top-2*html.ACTION_HEIGHT), sub.ConfWidth(width) sub.ConfHeight(height-top-2*html.ACTION_HEIGHT), sub.ConfWidth(width)
can.page.style(can, sub._output, html.MAX_WIDTH, width) can.page.style(can, sub._output, html.MAX_WIDTH)
can.base.isFunc(cb) && cb(msg) can.base.isFunc(cb) && cb(msg)
}) })
}, },