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)
|
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"))
|
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}
|
var layout = {top: event.clientY+10, left: event.clientX}
|
||||||
can.page.Modify(can, ui.fieldset, {style: layout})
|
can.page.Modify(can, p, {style: layout})
|
||||||
can.onmotion.move(can, ui.fieldset, layout)
|
|
||||||
|
can.onmotion.move(can, p, layout)
|
||||||
can.page.Remove(can, ui.legend)
|
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
|
background: function(can, url, target) { target = target || document.body
|
||||||
can.page.Modify(can, target, {style: {background: url == "" || url == "void"? "": 'url("'+url+'")'}})
|
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 {
|
body>fieldset.input {
|
||||||
position:fixed; top:32px;
|
position:fixed; top:32px;
|
||||||
}
|
background-color:#0d4142a6;
|
||||||
body>fieldset.input {
|
|
||||||
background-color:#30a7a93d;
|
|
||||||
position:fixed;
|
position:fixed;
|
||||||
z-index:50;
|
z-index:50;
|
||||||
}
|
}
|
||||||
|
body>fieldset.input div.output {
|
||||||
|
max-height:400px;
|
||||||
|
}
|
||||||
body>fieldset.input.key {
|
body>fieldset.input.key {
|
||||||
z-index:60;
|
z-index:60;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,8 @@ Volcanos("onfigure", {help: "控件详情", list: [], key: {onclick: function(ev
|
|||||||
can.page.Remove(can, figure.fieldset)
|
can.page.Remove(can, figure.fieldset)
|
||||||
}}
|
}}
|
||||||
}, figure.output)
|
}, figure.output)
|
||||||
|
|
||||||
|
can.onlayout.figure(can, figure, event)
|
||||||
}, true)
|
}, true)
|
||||||
}; run() }}, }, [])
|
}; run() }}, }, [])
|
||||||
|
|
||||||
|
@ -5,11 +5,12 @@ Volcanos("onfigure", {help: "控件详情", list: [], province: {onclick: functi
|
|||||||
"清空": function(event) { target.value = "" },
|
"清空": 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);
|
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) {
|
china_chart.setOption({geo: {map: 'china'}}), china_chart.on('click', function (params) {
|
||||||
target.value = params.name, can.page.Remove(can, figure.fieldset)
|
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