forked from x/volcanos
opt some
This commit is contained in:
parent
607937354a
commit
9f04b12adf
14
frame.js
14
frame.js
@ -488,11 +488,19 @@ Volcanos("onlayout", {help: "页面布局", list: [], _init: function(can, targe
|
||||
topic: function(can, topic) { topic && (can._topic = topic)
|
||||
can.user.topic(can, can._topic || can.user.Search(can, "topic") || ((can.user.Search(can, "pod")||can.base.isNight())? "black": "white"))
|
||||
},
|
||||
figure: function(can, ui, event) {
|
||||
figure: function(can, ui, event) { var p = ui.fieldset
|
||||
var layout = {top: event.clientY+10, left: event.clientX}
|
||||
can.page.Modify(can, ui.fieldset, {style: layout})
|
||||
can.onmotion.move(can, ui.fieldset, layout)
|
||||
can.page.Modify(can, p, {style: layout})
|
||||
|
||||
can.onmotion.move(can, p, layout)
|
||||
can.page.Remove(can, ui.legend)
|
||||
|
||||
var left = p.offsetLeft
|
||||
if (p.offsetLeft+p.offsetWidth > window.innerWidth) {
|
||||
left = window.innerWidth - p.offsetWidth
|
||||
}
|
||||
if (left < 120) { left = 120 }
|
||||
can.page.Modify(can, p, {style: {left: left}})
|
||||
},
|
||||
background: function(can, url, target) { target = target || document.body
|
||||
can.page.Modify(can, target, {style: {background: url == "" || url == "void"? "": 'url("'+url+'")'}})
|
||||
|
@ -239,12 +239,13 @@ fieldset>div.output div.project div.list {
|
||||
|
||||
body>fieldset.input {
|
||||
position:fixed; top:32px;
|
||||
}
|
||||
body>fieldset.input {
|
||||
background-color:#30a7a93d;
|
||||
background-color:#0d4142a6;
|
||||
position:fixed;
|
||||
z-index:50;
|
||||
}
|
||||
body>fieldset.input div.output {
|
||||
max-height:400px;
|
||||
}
|
||||
body>fieldset.input.key {
|
||||
z-index:60;
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ Volcanos("onfigure", {help: "控件详情", list: [], key: {onclick: function(ev
|
||||
can.page.Remove(can, figure.fieldset)
|
||||
}}
|
||||
}, figure.output)
|
||||
|
||||
can.onlayout.figure(can, figure, event)
|
||||
}, true)
|
||||
}; run() }}, }, [])
|
||||
|
||||
|
@ -5,11 +5,12 @@ Volcanos("onfigure", {help: "控件详情", list: [], province: {onclick: functi
|
||||
"清空": function(event) { target.value = "" },
|
||||
})
|
||||
|
||||
can.page.Modify(can, figure.fieldset, {style: {left: 120}})
|
||||
var china_chart = echarts.init(can.page.Append(can, figure.output, [{type: "div", style: {width: "600px", height: "400px"}}]).first);
|
||||
china_chart.setOption({geo: {map: 'china'}}), china_chart.on('click', function (params) {
|
||||
target.value = params.name, can.page.Remove(can, figure.fieldset)
|
||||
})
|
||||
|
||||
can.onlayout.figure(can, figure, event)
|
||||
})
|
||||
}}, })
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user