1
0
mirror of https://shylinux.com/x/volcanos synced 2025-04-26 01:04:06 +08:00
This commit is contained in:
shaoying 2020-09-18 13:15:06 +08:00
parent 03bf261bb4
commit 24c1e4e9b6
4 changed files with 3 additions and 6 deletions

View File

@ -13,4 +13,3 @@
<script src="index.js"></script> <script src="index.js"></script>
</body> </body>

View File

@ -189,7 +189,7 @@ Volcanos("onaction", {help: "控件交互", list: [],
}, },
_resize: function(can, hide) { _resize: function(can, hide) {
can.Timer(10, function() { 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}}) can.page.Modify(can, can.ui.profile, {style: {width: width}})
width -= can.ui.preview.offsetWidth + 20 width -= can.ui.preview.offsetWidth + 20
can.page.Modify(can, can.ui.content, {style: {"max-width": width}}) can.page.Modify(can, can.ui.content, {style: {"max-width": width}})

View File

@ -546,7 +546,7 @@ Volcanos("onfigure", {help: "图形绘制", list: [],
+ " + (" + target.Val("width") + "," + target.Val("height") + ")" + " + (" + target.Val("width") + "," + target.Val("height") + ")"
}, },
}, },
}, ["/plugin/local/wiki/draw/heart.js"]) }, [])
Volcanos("onaction", {help: "组件菜单", list: [ Volcanos("onaction", {help: "组件菜单", list: [
["grid", 1, 2, 3, 4, 5, 10, 20], ["grid", 1, 2, 3, 4, 5, 10, 20],
["stroke-width", 1, 2, 3, 4, 5], ["stroke-width", 1, 2, 3, 4, 5],

View File

@ -147,8 +147,6 @@ Volcanos("onaction", {help: "组件菜单", list: ["编辑", ["view", "横向",
}) })
}, },
_resize: function(can, layout) { _resize: function(can, layout) {
can.Conf("width", layout.width)
can.Conf("height", layout.height)
can.page.Modify(can, can._target, {style: layout}) can.page.Modify(can, can._target, {style: layout})
can.page.Select(can, can._output, "div.profile", function(item) { can.page.Select(can, can._output, "div.profile", function(item) {
can.page.Modify(can, item, {style: { can.page.Modify(can, item, {style: {
@ -224,7 +222,7 @@ Volcanos("onaction", {help: "组件菜单", list: ["编辑", ["view", "横向",
default: default:
can.run(event, ["inner"].concat(cmds), function(msg) { can.run(event, ["inner"].concat(cmds), function(msg) {
cb(msg), can.Timer(10, function() { cb(msg), can.Timer(10, function() {
can.onaction._resize(sub, layout) // can.onaction._resize(sub, layout)
}) })
}, true) }, true)
} }