mirror of
https://shylinux.com/x/volcanos
synced 2025-04-25 16:58:06 +08:00
opt some
This commit is contained in:
parent
c16c2bec18
commit
7647e24f80
3
frame.js
3
frame.js
@ -505,7 +505,7 @@ Volcanos(chat.ONLAYOUT, {help: "页面布局", _init: function(can, target) { ta
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var width = can._root._width, height = can._root._height
|
var width = window.innerWidth, height = window.innerHeight
|
||||||
can.page.Select(can, target, can.page.Keys(html.FIELDSET_HEAD, html.FIELDSET_FOOT), function(field) {
|
can.page.Select(can, target, can.page.Keys(html.FIELDSET_HEAD, html.FIELDSET_FOOT), function(field) {
|
||||||
height -= field.offsetHeight
|
height -= field.offsetHeight
|
||||||
})
|
})
|
||||||
@ -603,6 +603,7 @@ Volcanos(chat.ONLAYOUT, {help: "页面布局", _init: function(can, target) { ta
|
|||||||
})
|
})
|
||||||
Volcanos(chat.ONMOTION, {help: "动态特效", _init: function(can, target) {
|
Volcanos(chat.ONMOTION, {help: "动态特效", _init: function(can, target) {
|
||||||
window.addEventListener(html.ORIENTATIONCHANGE, function(event) { can.onengine.signal(can, html.ORIENTATIONCHANGE) })
|
window.addEventListener(html.ORIENTATIONCHANGE, function(event) { can.onengine.signal(can, html.ORIENTATIONCHANGE) })
|
||||||
|
window.onresize = function(event) { can.onengine.signal(can, chat.ONRESIZE) }
|
||||||
can.onmotion.float.auto(can, target)
|
can.onmotion.float.auto(can, target)
|
||||||
},
|
},
|
||||||
float: {_hash: {},
|
float: {_hash: {},
|
||||||
|
@ -190,6 +190,7 @@ Volcanos(chat.ONACTION, {help: "操作数据", _init: function(can, cb, target)
|
|||||||
},
|
},
|
||||||
onsize: function(can, msg, height, width) { can.Conf({height: height-can.Conf(html.MARGIN_Y), width: width-can.Conf(html.MARGIN_X)}) },
|
onsize: function(can, msg, height, width) { can.Conf({height: height-can.Conf(html.MARGIN_Y), width: width-can.Conf(html.MARGIN_X)}) },
|
||||||
onprint: function(can, msg) { can.page.styleHeight(can, can._target, "") },
|
onprint: function(can, msg) { can.page.styleHeight(can, can._target, "") },
|
||||||
|
onresize: function(can, msg) { can.onlayout._init(can), can.onaction.layout(can, can.Conf(chat.LAYOUT)) },
|
||||||
|
|
||||||
layout: function(can, button, silent) { button = button||ice.AUTO
|
layout: function(can, button, silent) { button = button||ice.AUTO
|
||||||
can.page.ClassList.del(can, can._target, can.Conf(chat.LAYOUT)); if (button == ice.AUTO) { button = "" }
|
can.page.ClassList.del(can, can._target, can.Conf(chat.LAYOUT)); if (button == ice.AUTO) { button = "" }
|
||||||
@ -204,6 +205,7 @@ Volcanos(chat.ONACTION, {help: "操作数据", _init: function(can, cb, target)
|
|||||||
|
|
||||||
can.core.Next(can._plugins, function(sub, next) { can.onmotion.delay(can, function() {
|
can.core.Next(can._plugins, function(sub, next) { can.onmotion.delay(can, function() {
|
||||||
sub.onaction._resize(sub, button == "" || button == ice.AUTO, can.ConfHeight(), can.ConfWidth()), next()
|
sub.onaction._resize(sub, button == "" || button == ice.AUTO, can.ConfHeight(), can.ConfWidth()), next()
|
||||||
|
if (button == "" || button == ice.AUTO) { can.page.style(can, sub._output, html.MAX_HEIGHT, "") }
|
||||||
}, 10) })
|
}, 10) })
|
||||||
},
|
},
|
||||||
help: function(can, button) { can.user.open("/help/"+button+".shy") },
|
help: function(can, button) { can.user.open("/help/"+button+".shy") },
|
||||||
|
@ -461,7 +461,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar
|
|||||||
can.page.styleWidth(can, can.ui.profile_output, profile_width)
|
can.page.styleWidth(can, can.ui.profile_output, profile_width)
|
||||||
can.page.styleWidth(can, can.ui.display_output, width-project_width)
|
can.page.styleWidth(can, can.ui.display_output, width-project_width)
|
||||||
|
|
||||||
var height = can.user.isMobile && can.isFloatMode()? window.innerHeight-2*html.ACTION_HEIGHT: can.ConfHeight()-1
|
var height = can.user.isMobile && can.isFloatMode()? window.innerHeight-2*html.ACTION_HEIGHT: can.base.Min(can.ConfHeight(), 320)-1
|
||||||
var display_height = can.ui.display.style.display == html.NONE? 0: (can.display_size[can.onexport.keys(can)]||120)
|
var display_height = can.ui.display.style.display == html.NONE? 0: (can.display_size[can.onexport.keys(can)]||120)
|
||||||
if (can.isCmdMode()) { height += html.ACTION_HEIGHT
|
if (can.isCmdMode()) { height += html.ACTION_HEIGHT
|
||||||
var content_height = height-display_height - can.ui._tabs.offsetHeight - can.ui._path.offsetHeight - 4
|
var content_height = height-display_height - can.ui._tabs.offsetHeight - can.ui._path.offsetHeight - 4
|
||||||
|
@ -56,6 +56,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar
|
|||||||
layout: function(can) { can.margin = can.margin||20
|
layout: function(can) { can.margin = can.margin||20
|
||||||
can.onmotion.clear(can), can.onimport._show(can, can.request())
|
can.onmotion.clear(can), can.onimport._show(can, can.request())
|
||||||
can.svg.Val(html.FONT_SIZE, can.Action("size"))
|
can.svg.Val(html.FONT_SIZE, can.Action("size"))
|
||||||
|
can.page.style(can, can._output, html.MAX_HEIGHT, "")
|
||||||
can.onaction[can.Action(ice.VIEW)](event, can, can.Action(ice.VIEW))
|
can.onaction[can.Action(ice.VIEW)](event, can, can.Action(ice.VIEW))
|
||||||
},
|
},
|
||||||
}, [""])
|
}, [""])
|
||||||
|
1
proto.js
1
proto.js
@ -211,6 +211,7 @@ var chat = {
|
|||||||
ONMAIN: "onmain", ONLOGIN: "onlogin", ONSEARCH: "onsearch",
|
ONMAIN: "onmain", ONLOGIN: "onlogin", ONSEARCH: "onsearch",
|
||||||
ONSIZE: "onsize", ONTOAST: "ontoast", ONREMOTE: "onremote",
|
ONSIZE: "onsize", ONTOAST: "ontoast", ONREMOTE: "onremote",
|
||||||
ONKEYUP: "onkeyup",
|
ONKEYUP: "onkeyup",
|
||||||
|
ONRESIZE: "onresize",
|
||||||
ONKEYDOWN: "onkeydown", ONMOUSEENTER: "onmouseenter", ORIENTATIONCHANGE: "orientationchange",
|
ONKEYDOWN: "onkeydown", ONMOUSEENTER: "onmouseenter", ORIENTATIONCHANGE: "orientationchange",
|
||||||
ONSTORM_SELECT: "onstorm_select", ONACTION_TOUCH: "onaction_touch", ONACTION_NOTOOL: "onaction_notool", ONACTION_CMD: "onaction_cmd",
|
ONSTORM_SELECT: "onstorm_select", ONACTION_TOUCH: "onaction_touch", ONACTION_NOTOOL: "onaction_notool", ONACTION_CMD: "onaction_cmd",
|
||||||
ONOPENSEARCH: "onopensearch", ONSEARCH_FOCUS: "onsearch_focus", ONCOMMAND_FOCUS: "oncommand_focus",
|
ONOPENSEARCH: "onopensearch", ONSEARCH_FOCUS: "onsearch_focus", ONCOMMAND_FOCUS: "oncommand_focus",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user