1
0
mirror of https://shylinux.com/x/volcanos synced 2025-07-04 05:18:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-03-01 11:36:52 +08:00
parent 87841a9e2f
commit 6ce0e580de
3 changed files with 20 additions and 11 deletions

View File

@ -1012,7 +1012,7 @@ fieldset.plan>div.output>div.layout>div.layout { align-items:flex-start; }
fieldset.plan>div.output>div.layout { height:100%; }
fieldset.draw>form.option>div.item.pid>input { width:var(--button-width) !important; }
fieldset.draw>div.output>div.layout>div.layout>div.profile table { width:100%; }
fieldset.draw>div.output>div.layout>div.layout>div.profile { width:var(--project-width); flex:0 0 var(--project-width); }
fieldset.draw>div.output>div.layout>div.layout>div.profile { width:var(--project-width); flex:0 0 var(--project-width); flex-grow:1; }
fieldset.draw>div.output>svg { margin-bottom:-5px; }
fieldset.draw>div.output>svg { min-height:100%; }
body.dark fieldset.float:not(.iframe) { background-color:#000c; }

View File

@ -9,7 +9,7 @@ Volcanos(chat.ONIMPORT, {
can._temp = []
if (can.ConfIndex() == web.WIKI_DRAW) { can.ui = can.onappend.layout(can), can.onexport.title(can, can.OptionPath())
if (can.isCmdMode() && !can.user.isMobile) { can.onmotion.toggle(can, can.ui.profile, true) } else { can.onmotion.hidden(can, can._action), can.onmotion.hidden(can, can.ui.project) }
} else { can.ui = {content: can._output} } can.page.Modify(can, can.ui.content, msg.Results()||can.onexport.content(can))
} else { can.ui.content || (can.ui = {content: can._output}) } can.page.Modify(can, can.ui.content, msg.Results()||can.onexport.content(can))
can.page.Select(can, can.ui.content, html.SVG, function(target) { can.ui.svg = can.ui.group = can.onimport._block(can, target), can.onimport._project(can, target), can.ui.profile && can.core.ItemCB(can.onaction, target, can)
can.page.Select(can, target, "", function(target) { can.onimport._block(can, target), can.page.tagis(target, svg.G) && target.Value(html.CLASS) && can.onimport._project(can, target) })
}), can.ondetail._select(can, can.db.hash[1]||can.OptionPid()||can.ui.svg.Value(svg.PID)), can.ui.points = []

View File

@ -1,13 +1,13 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg, cb) { can.page.requireDraw(can, function() { can.db.delay = 50
can.onappend.style(can, "pie")
can.list = can.onimport._data(can, msg, can.Conf(mdb.FIELD)||msg.append[1]||mdb.VALUE)
can.core.List(can.list, function(item) { msg.Push("weight", item.value.weight = parseInt(item.span*100/360)+"%").Push(cli.COLOR, '<span style="background-color:'+item.color+'"> </span>') })
can.onaction.list = [], can.ui.display = can.page.Append(can, can._output, [html.DISPLAY])._target
can.onappend.table(can, msg, null, can.ui.display), can.page.Select(can, can.ui.display, html.TR, function(tr, index) { can.ui.table = tr.parentNode
can.page.Modify(can, tr, {onmouseenter: function(event) { can._draw(can.db.which = index-1) }})
}), can.base.isFunc(cb) && cb(msg), can.onappend._status(can, msg.append)
}) },
_init: function(can, msg, cb) { can.ui = can.onappend.layout(can)
can.page.requireDraw(can, function() { can.db.delay = 50, can.onappend.style(can, "pie"), can.onaction.list = []
can.list = can.onimport._data(can, msg, can.Conf(mdb.FIELD)||msg.append[1]||mdb.VALUE)
can.core.List(can.list, function(item) { msg.Push("weight", item.value.weight = parseInt(item.span*100/360)+"%").Push(cli.COLOR, '<span style="background-color:'+item.color+'"> </span>') })
can.onappend.table(can, msg, null, can.ui.profile), can.page.Select(can, can.ui.profile, html.TR, function(tr, index) { can.ui.table = tr.parentNode
can.page.Modify(can, tr, {onmouseenter: function(event) { can._draw(can.db.which = index-1) }})
}), can.base.isFunc(cb) && cb(msg), can.onappend._status(can, msg.append)
})
},
_data: function(can, msg, field) { var list = []
var color = [
"#8085e9",
@ -69,6 +69,15 @@ Volcanos(chat.ONIMPORT, {
return parseInt(value)
},
layout: function(can) { if (!can.ui || !can.ui.svg) { return }
can.onmotion.hidden(can, can.ui.project), can.onmotion.hidden(can, can.ui.display), can.onmotion.toggle(can, can.ui.profile, true)
var _width = can.base.Max(can.ConfWidth()-can.ConfHeight(), 600, 200)
can.page.style(can, can.ui.profile, html.HEIGHT, can.ConfHeight(), html.WIDTH, _width, html.FLEX, "0 0 "+(_width)+"px")
var width = can.ConfWidth()-_width, height = can.ConfHeight()-4, margin = 40, r = can.base.Max(height, width)/2-1*margin-margin
can.page.style(can, can.ui.content, html.HEIGHT, can.ConfHeight(), html.WIDTH, width)
can.ui.svg.Val(html.WIDTH, width), can.ui.svg.Val(html.HEIGHT, height)
can._draw = function(which) { can.onimport._draw(can, width/2-margin/2, height/2-margin/2, r, margin, which) }, can._draw(can.db.which||0)
return
var height = can.base.Max(can.ConfHeight(), can.ConfWidth()/2), margin = 10, r = height/2-1*margin-margin
can.page.style(can, can.ui.display, html.WIDTH, can.ConfWidth()-height-1), can.ui.svg.Val(html.HEIGHT, height), can.ui.svg.Val(html.WIDTH, height)
can._draw = function(which) { can.onimport._draw(can, height/2-margin/2, can.ConfHeight()/2-margin/2, r, margin, which) }, can._draw(can.db.which||0)