diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-12 18:29:37 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-02-12 18:29:37 +0000 |
commit | 2df07ad811f0929103ef03c4ac84fdbfde00412f (patch) | |
tree | e6ee1cf1e302ef715b928e51745d85af35dd5780 /sca-cpp/trunk/modules/edit/htdocs | |
parent | 085c66b5066a1b47d3980496069762361aa98bba (diff) |
Add a few sample composites and a few fixes to the existing ones.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1070123 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/edit/htdocs')
-rw-r--r-- | sca-cpp/trunk/modules/edit/htdocs/graph/graph.html | 13 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/edit/htdocs/graph/graph.js | 41 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/edit/htdocs/main.html | 6 | ||||
-rw-r--r-- | sca-cpp/trunk/modules/edit/htdocs/page/page.html | 8 |
4 files changed, 38 insertions, 30 deletions
diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html index b5eceddb53..6de3617651 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html +++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.html @@ -34,9 +34,9 @@ <table style="width: 100%;"> <tr> -<th class="thl" style="width: 230px; min-width: 230px;">Palette</th><th class="ths" style="width: 3px; min-width: 3px;"></th> +<th class="thl" style="width: 225px; min-width: 225px;">Palette</th> -<th class="thr" style="padding-top: 0px; padding-bottom: 0px;"> +<th class="thr" style="padding-left: 4px; padding-top: 0px; padding-bottom: 0px;"> <input id="compName" type="text" value="component name" style="position: relative; width: 200px;"/> <input id="propValue" type="text" value="property value" style="position: relative; width: 300px;"/> </th> @@ -47,7 +47,7 @@ </th> </tr> -<tr style="height: 5000px;"><td class="tdl"></td><th class="ths"></th><td class="tdr" colspan="2"></td></tr> +<tr style="height: 5000px;"><td class="tdl"></td><td class="tdr" colspan="2"></td></tr> </table> </div> @@ -110,7 +110,7 @@ function getpalette(name, g, bg, palette, gpalettes) { if (isNil(name)) return; palettes.get(name, function(doc) { - gpalettes[name] = graph.composite(atomcomposite(doc), graph.mkpath().move(85,0)); + gpalettes[name] = graph.composite(atomcomposite(doc), graph.mkpath().move(80,0)); graph.display(gpalettes[name], name == spalette? g : bg); }); } @@ -154,11 +154,12 @@ var bg = graph.mkgroup(graph.mkpath()); var gpalettes = new Array(); var spalette = 'events'; var pos = graph.mkpath(); -installpalette('events', pos.rmove(0,10), g, bg, spalette, gpalettes); +installpalette('events', pos.rmove(0,0), g, bg, spalette, gpalettes); installpalette('values', pos.rmove(0,50), g, bg, spalette, gpalettes); installpalette('url', pos.rmove(0, 50), g, bg, spalette, gpalettes); installpalette('lists', pos.rmove(0, 50), g, bg, spalette, gpalettes); -installpalette('operators', pos.rmove(0, 50), g, bg, spalette, gpalettes); +installpalette('text', pos.rmove(0, 50), g, bg, spalette, gpalettes); +installpalette('logic', pos.rmove(0, 50), g, bg, spalette, gpalettes); installpalette('math', pos.rmove(0, 50), g, bg, spalette, gpalettes); installpalette('social', pos.rmove(0, 50), g, bg, spalette, gpalettes); installpalette('sensors', pos.rmove(0, 50), g, bg, spalette, gpalettes); diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js index aed29f345a..c2cdb66e89 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js +++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js @@ -55,9 +55,9 @@ var palcx = 250; var trashcx = 230; var proxcx = 20; var proxcy = 20; -var buttoncx = 80; +var buttoncx = 70; var buttoncy = 40; -var curvsz = 5; +var curvsz = 6; var tabsz = 3; /** @@ -361,9 +361,9 @@ if (ui.isIE()) { graph.mktitle = function(t, bold, pos) { var title = document.createElement('v:textbox'); title.style.position = 'absolute'; - title.style.left = pos.xpos(); + title.style.left = pos.xpos() + 2; title.style.top = pos.ypos(); - title.inset = '' + 4 + 'px ' + pos.ypos() + 'px 0px 0px'; + title.inset = '' + 6 + 'px ' + pos.ypos() + 'px 0px 0px'; if (bold) title.style.fontWeight = 'bold'; var tnode = document.createTextNode(t); @@ -378,7 +378,7 @@ if (ui.isIE()) { var tsvcs = graph.tsvcs(comp); var lsvcs = graph.lsvcs(comp); var pos = graph.mkpath().move(isNil(lsvcs)? tabsz : (tabsz * 5), isNil(tsvcs)? tabsz : (tabsz * 5)); - return graph.mktitle(graph.title(comp), true, pos); + return graph.mktitle(graph.title(comp), false, pos); }; /** @@ -399,7 +399,7 @@ if (ui.isIE()) { var tsvcs = graph.tsvcs(comp); var lsvcs = graph.lsvcs(comp); var pos = graph.mkpath().move(isNil(lsvcs)? tabsz : (tabsz * 5), isNil(tsvcs)? 15 + tabsz : 15 + (tabsz * 5)); - return graph.mktitle(graph.property(comp), false, pos); + return graph.mktitle(graph.property(comp), true, pos); }; /** @@ -461,7 +461,7 @@ if (ui.isIE()) { contour.path = d; contour.filled = 'false'; contour.strokecolor = graph.colors.gray; - contour.strokeweight = '2'; + contour.strokeweight = '1'; contour.style.left = 1; contour.style.top = 1; var stroke = document.createElement('v:stroke'); @@ -506,7 +506,7 @@ if (ui.isIE()) { graph.mkbutton = function(t, pos) { // Make the title element - var title = graph.mktitle(t, true, pos); + var title = graph.mktitle(t, true, graph.mkpath().move(4,4)); // Compute the path of the button shape var path = graph.buttonpath().str(); @@ -528,7 +528,7 @@ if (ui.isIE()) { contour.path = path; contour.filled = 'false'; contour.strokecolor = graph.colors.gray; - contour.strokeweight = '2'; + contour.strokeweight = '1'; contour.style.left = 1; contour.style.top = 1; var stroke = document.createElement('v:stroke'); @@ -851,7 +851,7 @@ if (ui.isIE()) { * Return an element representing the title of a component. */ graph.comptitle = function(comp) { - return graph.mktitle(graph.title(comp), true); + return graph.mktitle(graph.title(comp), false); }; /** @@ -887,7 +887,7 @@ if (ui.isIE()) { * Return an element representing the value of a property. */ graph.proptitle = function(comp) { - var title = graph.mktitle(graph.property(comp), false); + var title = graph.mktitle(graph.property(comp), true); title.setAttribute('y', 30); return title; }; @@ -926,7 +926,7 @@ if (ui.isIE()) { contour.setAttribute('d', d); contour.setAttribute('fill', 'none'); contour.setAttribute('stroke', graph.colors.gray); - contour.setAttribute('stroke-width', '4'); + contour.setAttribute('stroke-width', '3'); contour.setAttribute('stroke-opacity', '0.20'); contour.setAttribute('transform', 'translate(1,1)'); @@ -978,7 +978,7 @@ if (ui.isIE()) { contour.setAttribute('d', path); contour.setAttribute('fill', 'none'); contour.setAttribute('stroke', graph.colors.gray); - contour.setAttribute('stroke-width', '4'); + contour.setAttribute('stroke-width', '3'); contour.setAttribute('stroke-opacity', '0.20'); contour.setAttribute('transform', 'translate(1,1)'); @@ -1035,9 +1035,14 @@ graph.bringtotop = function(n, g) { * Return the title of a SCDL element. */ graph.title = function(e) { - var d = scdl.documentation(e); - if (d != null) - return d; + var t = scdl.title(e); + if (t != null) { + if (t == 'gt') + return '>' + if (t == 'lt') + return '<'; + return t; + } return scdl.name(e); }; @@ -1181,6 +1186,8 @@ graph.compheight = function(comp, cassoc) { var rrefs = graph.rrefs(comp); var rrefsh = graph.rrefsheight(rrefs, cassoc) + (tabsz * 4); var height = Math.max(lsvcsh, rrefsh); + if (!isNil(graph.brefs(comp))) + height = Math.max(height, (tabsz * 10) + (tabsz * 4) + (tabsz * 2)); return height; }); }; @@ -1530,7 +1537,7 @@ graph.composite = function(compos, pos) { } // Render the promoted service components - var rproms = renderproms(proms, cassoc, pos.clone().rmove(20,20)); + var rproms = renderproms(proms, cassoc, pos.clone().rmove(tabsz * 4, tabsz * 4)); if (name == 'palette') { diff --git a/sca-cpp/trunk/modules/edit/htdocs/main.html b/sca-cpp/trunk/modules/edit/htdocs/main.html index c0c948e091..b219c27e50 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/main.html +++ b/sca-cpp/trunk/modules/edit/htdocs/main.html @@ -34,13 +34,13 @@ <p>Try the <a href="dash" target="_parent">App Dashboard</a> to manage your collection of apps.</p> <h2>Composition Editor</h2> -<p>Try the <a href="graph/?app=store" target="_parent">Composition Editor</a> to compose the logic of an app.</p> +<p>Try the <a href="graph/?app=myprofile" target="_parent">Composition Editor</a> to compose the logic of an app.</p> <h2>Page Editor</h2> -<p>Try the <a href="page/?app=store" target="_parent">Page Editor</a> to draw an app page.</p> +<p>Try the <a href="page/?app=myprofile" target="_parent">Page Editor</a> to draw an app page.</p> <h2>App Settings Editor</h2> -<p>Try the <a href="app/?app=store" target="_parent">App Settings Editor</a> to edit the settings of app.</p> +<p>Try the <a href="app/?app=myprofile" target="_parent">App Settings Editor</a> to edit the settings of app.</p> </div> diff --git a/sca-cpp/trunk/modules/edit/htdocs/page/page.html b/sca-cpp/trunk/modules/edit/htdocs/page/page.html index e1800bcdb5..e305058475 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/page/page.html +++ b/sca-cpp/trunk/modules/edit/htdocs/page/page.html @@ -34,10 +34,10 @@ <table style="width: 100%;"> <tr> -<th class="thl thr" style="width: 230px; min-width: 230px;">Palette</th><th class="ths" style="width: 3px; min-width: 3px;"></th> +<th class="thl" style="width: 225px; min-width: 225px;">Palette</th> -<th class="thl thr" style="padding-top: 0px; padding-bottom: 0px;"> -<input id="widgetName" type="text" value="widget name" style="position: relative; width: 150px;"/> +<th class="thr" style="padding-left: 4px; padding-top: 0px; padding-bottom: 0px;"> +<input id="widgetName" type="text" value="widget name" style="position: relative; width: 200px;"/> <input id="widgetText" type="text" value="widget text" style="position: relative; width: 300px;"/> </th> @@ -47,7 +47,7 @@ </th> </tr> -<tr style="height: 5000px;"><td class="tdl"></td><th class="ths"></th><td class="tdr" colspan="2"></td></tr> +<tr style="height: 5000px;"><td class="tdl"></td><td class="tdr" colspan="2"></td></tr> </table> <div id="page" style="position: absolute; top: 40px; left: 0px; width: 5000px; height: 5000px;"> |