apf.registerHotkey("Shift-S", function(){ trTools.select(trTools.queryNode("//node()[@name='Selection']")); }); Project Edit Select X: Y: W: H: Columns: Edge: Padding: Pack: Start Middle End Stretch Margin: Span: // 1; var newList = []; btnBar.show(); //Multiple if (multiple) { newList.push(btnVBox, btnHBox, btnTable, div1, btnEraser, div2, btnFront, btnForward, btnBackward, btnBack); } else if (sel.length) { sel = sel[0]; if (lastSel != sel) { var isLayout = layout.indexOf(sel.localName) > -1; var isTable = sel.localName == "table"; var isInLayout = layout.indexOf(sel.parentNode.localName) > -1; if (isLayout) newList.push(divMoreFeat, btnEraser, divBaseFeat, lblEdge, tbEdge, lblPadding, tbPadding, lblPack, ddPack, elStretch); else if (sel != app) newList.push(btnEraser, divActions, div2, btnFront, btnForward, btnBackward, btnBack); if (isTable) { newList.push(lblCols); newList.push(tbCols); } if (isInLayout) { newList.push(lblW, elW); /*if (sel.parentNode.localName != "table") newList.push(lblH, elH, lblAlign, ddAlign); else*/ newList.push(lblSpan, elSpan); newList.push(divMoreFeat, lblMargin, elMargin); } else newList.push(/*lblX, elX, lblY, elY,*/ lblW, elW, lblH, elH /*, lblAlign, ddAlign */); } } if (lastSel != sel) { for (var i = 0, il = lastList.length; i < il; i++) { lastList[i].setProperty("visible", false); } lastList = newList; } for (var prop, item, i = 0, il = newList.length; i < il; i++) { prop = (item = newList[i]).prop; if (lastSel != sel) { if (prop == "height" && sel.top && sel.bottom) { lblH.setProperty("visible", false); continue; } if (prop == "width" && sel.left && sel.right) { lblW.setProperty("visible", false); continue; } item.setProperty("visible", true); } if (prop) //@todo check this item.setProperty("value", sel[prop]); } lastSel = sel; apf.layout.processQueue(); }, 100); }); selection.addEventListener("update-content", function(e){ var newList = lastList; var sel = e.sel; if (lastSel != sel) return; for (var prop, item, i = 0, il = newList.length; i < il; i++) { prop = (item = newList[i]).prop; if (lastSel != sel) { if (prop == "height" && sel.top && sel.bottom) { lblH.setProperty("visible", false); continue; } if (prop == "width" && sel.left && sel.right) { lblW.setProperty("visible", false); continue; } //item.setProperty("visible", true); } if (prop) //@todo check this item.setProperty("value", sel[prop]); } apf.layout.processQueue(); }) var nodes = hboxTools.childNodes; for (var i = 0, il = nodes.length; i < il; i++) { if (nodes[i].hide) nodes[i].hide(); } var nodes = btnBar.childNodes; for (var i = 0, il = nodes.length; i < il; i++) { if (nodes[i].hide) nodes[i].hide(); } if (apf.isIE) apf.mouseEventBuffer = 30; //@todo - this should auto-adjust based on the system performance //]]> Save Share Undo Redo Cut Copy Paste Duplicate Lock Remove Select Parent Select All Ungroup Show grid Snap to Grid Guides Elements Container /* to be removed */ apf.addEventListener("load", function(){ apf.config.$setDynamicProperty("gridsize", "{spGridSize.value}"); apf.config.$setDynamicProperty("showgrid", "{cbSg.value}"); apf.config.$setDynamicProperty("snapgrid", "{cbGr.value}"); apf.config.$setDynamicProperty("snapguide", "{cbGu.value}"); apf.config.$setDynamicProperty("snapelement", "{cbEl.value}"); apf.config.$setDynamicProperty("snapcontainer", "{cbCo.value}"); }); Show ErrorboxShow ErrorboxShow ErrorboxShow ErrorboxShow ErrorboxShow ErrorboxShow ErrorboxShow ErrorboxShow ErrorboxShow Errorbox