diff --git a/frame.js b/frame.js index e6fef32a..fa7c718a 100644 --- a/frame.js +++ b/frame.js @@ -736,15 +736,11 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { append(can.page.Append(can, target, [html.LAYOUT])._target, type==FLOW? FLEX: FLOW, item) } else if (can.base.isObject(item)) { if (item.index) { item._index = count++, ui.size[item._index] = item.height||item.width - item.type = item.type||"story", item.layout = function(height, width) { - can.page.style(can, ui[item._index], html.WIDTH, width) - } + item.type = item.type||"story", item.layout = function(height, width) { can.page.style(can, ui[item._index], html.WIDTH, width) } can.onappend.plugin(can, item, function(sub) { can._plugins = (can._plugins||[]).concat([sub]) item.layout = function(height, width) { sub.onimport.size(sub, height, width, false) } can.onmotion.select(can, sub._target.parentNode, html.FIELDSET, sub._target) - sub.onexport._output = function() { can.onimport.layout(can) - can.onmotion.delay(can, function() { can.onmotion.toggle(can, target, true) }) - } + sub.onexport._output = function() { can.onimport.layout(can), can.onmotion.delay(can, function() { can.onmotion.toggle(can, target, true) }) } }, target, ui[item._index] = can.onappend.field(can, item.type, item, target)._target) can.base.isIn(item._command, web.PORTAL, web.DESKTOP, aaa.OFFER, aaa.APPLY, code.VIMER) && can.onmotion.hidden(can, target) } else { can.page.Append(can, target, [item]) } @@ -779,13 +775,16 @@ Volcanos(chat.ONAPPEND, {_init: function(can, meta, list, cb, target, field) { can.page.Select(can, target, "span.name", function(target, index, list) { can.page.style(can, target, html.MAX_WIDTH, (_width-50)/list.length-40) }) }) } - can.db.value._display_plugin && (height = height/2), can.page.style(can, can.ui.content, html.HEIGHT, height) - can.db.value._display_plugin && can.db.value._display_plugin.onimport.size(can.db.value._display_plugin, height-1, width, false) - can.db.value._display_plugin && can.onmotion.toggle(can, can.ui.display, true) - can.db.value._profile_plugin && (width = width/2), can.page.style(can, can.ui.content, html.WIDTH, width) - can.db.value._profile_plugin && can.db.value._profile_plugin.onimport.size(can.db.value._profile_plugin, height, width-1, false) - can.db.value._profile_plugin && can.onmotion.toggle(can, can.ui.profile, true) + if (can.page.isDisplay(can.ui.display)) { + height = height/2, can.page.style(can, can.ui.content, html.HEIGHT, height), can.page.style(can, can.ui.display, html.HEIGHT, height) + can.db.value._display_plugin && can.db.value._display_plugin.onimport.size(can.db.value._display_plugin, height-1, width, false) + } + if (can.page.isDisplay(can.ui.profile)) { + width = width/2, can.page.style(can, can.ui.content, html.WIDTH, width), can.page.style(can, can.ui.profile, html.WIDTH, width) + can.db.value._profile_plugin && can.db.value._profile_plugin.onimport.size(can.db.value._profile_plugin, height, width-1, false) + } can.db.value._content_plugin && can.db.value._content_plugin.onimport.size(can.db.value._content_plugin, height, width, false) + can.ui.toggle && can.ui.toggle.layout() } cb && cb(content_height, content_width) }, delay||0) } can.onimport.layout = can.onimport.layout||function(can) { diff --git a/index.css b/index.css index 20c3c098..dca68f33 100644 --- a/index.css +++ b/index.css @@ -245,8 +245,9 @@ div.project div.zone>div.list>div.zone>div.item:hover { margin-left:var(--button div.item>i.bi-chevron-down { float:right; transition:all .5s; } div.item.open>i.bi-chevron-down { rotate:-180deg; transition:all .3s; } div.item.text.trans input:not([type=button]) { transition:all 1s; } -div.item.text.trans input:not([type=button]):focus { width:var(--river-width); transition:all .5s; } -div.toggle { background-color:var(--hover-bg-color); color:var(--hover-fg-color); font-size:var(--action-height); padding-top:38px; height:120px; position:absolute; } +div.item.text.trans input:not([type=button]):focus { width:var(--project-width); transition:all .5s; } +div.toggle { background-color:var(--hover-bg-color); font-size:var(--action-height); padding-top:38px; height:120px; position:absolute; } +div.toggle:hover { color:var(--hover-fg-color); } div.toggle.project { top:20%; left:0; border-top-right-radius:var(--plugin-radius); border-bottom-right-radius:var(--plugin-radius); } div.content>div.toggle.profile { top:20%; right:0; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); } div.content>div.toggle.display { left:20%; bottom:-52px; rotate:90deg; border-top-left-radius:var(--plugin-radius); border-bottom-left-radius:var(--plugin-radius); } @@ -737,7 +738,7 @@ fieldset.float>div.action>div.item.button._space.icons { margin-left:0; } svg text { font-size:var(--svg-font-size); font-family:var(--svg-font-family); stroke:var(--body-fg-color); fill:var(--body-fg-color); cursor:pointer; } svg text.offline { stroke:var(--disable-fg-color); fill:var(--disable-fg-color); } svg text:hover { cursor:pointer; } -svg rect { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); fill:var(--output-bg-color); } +svg rect { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); fill:var(--output-bg-color); cursor:pointer; } svg rect:hover { stroke:var(--hover-fg-color); fill:var(--hover-bg-color); } svg line { stroke-width:var(--svg-stroke-width); stroke:var(--body-fg-color); } svg line:hover { stroke:var(--hover-fg-color); } diff --git a/lib/user.js b/lib/user.js index eae5fc3e..f6936e9b 100644 --- a/lib/user.js +++ b/lib/user.js @@ -170,7 +170,8 @@ Volcanos("user", { } } if (can.base.isString(item)||can.base.isNumber(item)) { var _style = can.page.buttonStyle(can, item) return { - view: [[html.ITEM, item, _style], html.DIV, (isinput || meta._style == ice.CMD) && !trans? item: can.user.trans(can, item, trans)], + // view: [[html.ITEM, item, _style], html.DIV, (isinput || meta._style == ice.CMD) && !trans? item: can.user.trans(can, item, trans)], + view: [[html.ITEM, item, _style], html.DIV, can.user.trans(can, item, trans)], onmouseenter: function(event) { remove_sub(carte) }, onclick: function(event) { click(event, item, index) }, } diff --git a/plugin/local/wiki/draw.js b/plugin/local/wiki/draw.js index 169c0caa..c35e8cc5 100644 --- a/plugin/local/wiki/draw.js +++ b/plugin/local/wiki/draw.js @@ -72,9 +72,12 @@ Volcanos(chat.ONIMPORT, {_init: function(can, msg) { var target = can.onimport.block(can, figure.data.name||meta.shape, data, group); can.core.ItemCB(meta, target, can) return meta._init && meta._init(target), target }, - layout: function(can) { can.ui.layout && can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) { - can.page.style(can, can.ui.svg, html.MIN_HEIGHT, height, html.MIN_WIDTH, width) - }) }, + layout: function(can) { + can.ui.svg && can.page.style(can, can.ui.svg, html.MIN_HEIGHT, can.ConfHeight(), html.MIN_WIDTH, can.ConfWidth()) + can.ui.layout && can.ui.layout(can.ConfHeight(), can.ConfWidth(), 0, function(height, width) { + can.page.style(can, can.ui.svg, html.MIN_HEIGHT, height, html.MIN_WIDTH, width) + }) + }, }) Volcanos(chat.ONACTION, {list: [ [svg.GO, ctx.RUN, ice.AUTO, "manual"], [ice.MODE, web.DRAW, html.MOVE, html.RESIZE], diff --git a/plugin/table.js b/plugin/table.js index 4a3d819a..bb0f9f34 100644 --- a/plugin/table.js +++ b/plugin/table.js @@ -270,7 +270,7 @@ Volcanos(chat.ONEXPORT, { action_value: function(can, key, def) { var value = can.Action(key); return can.base.isIn(value, ice.AUTO, key, undefined)? def: value }, tabs: function(can) {}, tool: function(can) { can.misc.sessionStorage(can, [can.ConfIndex(), "tool"], JSON.stringify(can.page.Select(can, can._status, html.LEGEND, function(target) { return target._meta }))) }, - hash: function(can, hash) { hash = typeof hash == code.STRING? hash.split(":"): hash || can.core.Item(can.Option(), function(key, value) { return value||"" }) + hash: function(can, hash) { hash = typeof hash == code.STRING? hash.split(":").concat(can.core.List(arguments).slice(2)||[]): hash || can.core.Item(can.Option(), function(key, value) { return value||"" }) can.misc.SearchHash(can, hash), can.misc.localStorage(can, [can.ConfSpace()||can.misc.Search(can, ice.POD), can.ConfIndex(), "hash"], hash) }, session: function(can, key, value) { return can.misc[can.user.isWebview? "localStorage": "sessionStorage"](can, [can.Conf(ctx.INDEX), key, location.pathname].join(":"), value == ""? "": JSON.stringify(value)) },