From b9e4f73c966a944558c0a30fe8f9471dc78b770a Mon Sep 17 00:00:00 2001 From: shaoying Date: Tue, 4 Aug 2020 22:25:50 +0800 Subject: [PATCH] opt some --- plugin/local/code/inner.css | 3 ++- plugin/story/spide.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin/local/code/inner.css b/plugin/local/code/inner.css index 15863edd..0731ee81 100644 --- a/plugin/local/code/inner.css +++ b/plugin/local/code/inner.css @@ -23,7 +23,7 @@ fieldset.editor>div.output { fieldset.editor>div.output>div.project { text-align:left; max-height:400px; overflow:auto; - max-width:120px; + max-width:160px; color:white; } fieldset.editor>div.output>div.project div.item { @@ -60,6 +60,7 @@ fieldset.editor>div.output div.content { font-size:16px; font-family:monospace; border-left:solid 2px red; min-height:200px; + min-width:600px; overflow:auto; float:left; } diff --git a/plugin/story/spide.js b/plugin/story/spide.js index e4afe8d8..52e5e702 100644 --- a/plugin/story/spide.js +++ b/plugin/story/spide.js @@ -23,6 +23,7 @@ Volcanos("onimport", {help: "导入数据", list: [], can.Action("height", "400") can.Action("speed", "100") can.Action("scale", "1") + can.Action("stroke-width", "1") can.sub.svg.Value("transform", "scale("+can.Action("scale")+")") can.onaction["横向"](event, can) sub.Action("go", "run") @@ -31,7 +32,7 @@ Volcanos("onimport", {help: "导入数据", list: [], }, can.ui.content) }, }) -Volcanos("onaction", {help: "组件菜单", list: ["编辑", "清空", ["view", "横向", "纵向"], ["height", "100", "200", "400", "600"], ["speed", "10", "50", "100"], ["scale", "0.2", "0.5", "1", "2", "5"]], +Volcanos("onaction", {help: "组件菜单", list: ["编辑", ["view", "横向", "纵向"], ["scale", "0.2", "0.5", "1", "2", "5"]], "编辑": function(event, can) { var hide = can.sub._action.style.display == "none" can.page.Modify(can, can.sub._action, {style: {display: hide? "": "none"}}) @@ -53,7 +54,7 @@ Volcanos("onaction", {help: "组件菜单", list: ["编辑", "清空", ["view", _tree: function(can, msg) { var list = {} msg.Table(function(value, index) { - can.core.List(value.path.split("/"), function(item, index, array) { + value.path && can.core.List(value.path.split("/"), function(item, index, array) { var last = array.slice(0, index).join("/") || "" var name = array.slice(0, index+1).join("/") list[last] = list[last] || {name: last, list: []}