From 24c1e4e9b6e8fe39a0a75b7b9fecac4c09a9a516 Mon Sep 17 00:00:00 2001 From: shaoying Date: Fri, 18 Sep 2020 13:15:06 +0800 Subject: [PATCH] opt some --- index.html | 1 - plugin/local/code/inner.js | 2 +- plugin/local/wiki/draw.js | 2 +- plugin/story/spide.js | 4 +--- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 6bc3fa96..5170f840 100644 --- a/index.html +++ b/index.html @@ -13,4 +13,3 @@ - diff --git a/plugin/local/code/inner.js b/plugin/local/code/inner.js index 2fd384a9..e2248a56 100644 --- a/plugin/local/code/inner.js +++ b/plugin/local/code/inner.js @@ -189,7 +189,7 @@ Volcanos("onaction", {help: "控件交互", list: [], }, _resize: function(can, hide) { can.Timer(10, function() { - var width = ((parseInt(can.Conf("width"))-60)||can._target.offsetWidth) - (hide? can.ui.project.offsetWidth+10: 0) + var width = ((parseInt(can.Conf("width"))-30)||can._target.offsetWidth) - (hide? can.ui.project.offsetWidth+10: 0) can.page.Modify(can, can.ui.profile, {style: {width: width}}) width -= can.ui.preview.offsetWidth + 20 can.page.Modify(can, can.ui.content, {style: {"max-width": width}}) diff --git a/plugin/local/wiki/draw.js b/plugin/local/wiki/draw.js index 95fe00d5..eb2f9fab 100644 --- a/plugin/local/wiki/draw.js +++ b/plugin/local/wiki/draw.js @@ -546,7 +546,7 @@ Volcanos("onfigure", {help: "图形绘制", list: [], + " + (" + target.Val("width") + "," + target.Val("height") + ")" }, }, -}, ["/plugin/local/wiki/draw/heart.js"]) +}, []) Volcanos("onaction", {help: "组件菜单", list: [ ["grid", 1, 2, 3, 4, 5, 10, 20], ["stroke-width", 1, 2, 3, 4, 5], diff --git a/plugin/story/spide.js b/plugin/story/spide.js index b61bef53..a36a5593 100644 --- a/plugin/story/spide.js +++ b/plugin/story/spide.js @@ -147,8 +147,6 @@ Volcanos("onaction", {help: "组件菜单", list: ["编辑", ["view", "横向", }) }, _resize: function(can, layout) { - can.Conf("width", layout.width) - can.Conf("height", layout.height) can.page.Modify(can, can._target, {style: layout}) can.page.Select(can, can._output, "div.profile", function(item) { can.page.Modify(can, item, {style: { @@ -224,7 +222,7 @@ Volcanos("onaction", {help: "组件菜单", list: ["编辑", ["view", "横向", default: can.run(event, ["inner"].concat(cmds), function(msg) { cb(msg), can.Timer(10, function() { - can.onaction._resize(sub, layout) + // can.onaction._resize(sub, layout) }) }, true) }