You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by zo...@apache.org on 2010/07/03 12:22:02 UTC
svn commit: r960193 -
/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/TwistieSection.js
Author: zoe
Date: Sat Jul 3 10:22:02 2010
New Revision: 960193
URL: http://svn.apache.org/viewvc?rev=960193&view=rev
Log:
ARIES-319 Adding twistie section names back
Modified:
incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/TwistieSection.js
Modified: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/TwistieSection.js
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/TwistieSection.js?rev=960193&r1=960192&r2=960193&view=diff
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/TwistieSection.js (original)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/elements/TwistieSection.js Sat Jul 3 10:22:02 2010
@@ -52,6 +52,7 @@ dojo.declare("goat.elements.TwistieSecti
this.items = new Array();
this.itemTexts = new Array();
+ this.name = this.type.substring("relationship.aggregation.".length, this.type.length);
this.twistieGroup = this.component.group.createGroup();
this.component.group.remove(this.twistieGroup);
@@ -76,9 +77,14 @@ dojo.declare("goat.elements.TwistieSecti
render: function(){
console.log("RENDERING...");
this.component.group.remove(this.twistieGroup);
- if(this.built) {this.twistieHandleGroup.remove(this.twistieHandle);}
+ if(this.built) {
+ this.twistieHandleGroup.remove(this.twistieHandle);
+ this.twistieGroup.remove(this.twistieText);
+ }
this.createTwistie();
+ this.createText();
+
if(this.isOpen) {
this.removeItemsFromDisplay();
this.addItemsToDisplay();
@@ -172,7 +178,9 @@ dojo.declare("goat.elements.TwistieSecti
this.isOpen=!this.isOpen;
this.twistieHandleGroup.remove(this.twistieHandle);
+ this.twistieGroup.remove(this.twistieText);
this.createTwistie();
+ this.createText();
if(this.isOpen){
this.addItemsToDisplay();
@@ -182,6 +190,14 @@ dojo.declare("goat.elements.TwistieSecti
console.log("twistie requesting refresh of component due to change in state/content");
this.component.refresh();
},
+ createText: function(){
+ var textOffset = this.y + 10;
+ var x = this.x + 17;
+ this.twistieText = this.twistieGroup.createText({x: x, y: textOffset, text: this.name, align: "start"})
+ .setFont({family: "times", size: "8pt"})
+ .setFill("#000000");
+ },
+
createTwistie: function(){
console.log("in create twistie, x = " + this.x + " y = " + this.y);
var pys = this.y;