2012-06-30 68 views

回答

0

目前不支持嵌套数字。

对不起

安德烈亚斯

1

但是我能,使用装饰的方法做,效果很好。

ivr.shape.menu.Menu = graphiti.shape.basic.Rectangle.extend(
{ 
    TitleLocator : graphiti.layout.locator.Locator.extend({ 
     init: function(parent) { this._super(parent); }, 
     relocate:function(index, figure){ 
      var bb = this.getParent().getBoundingBox(); 
      var tbb = figure.getBoundingBox(); 
      figure.setPosition(bb.getWidth()/2-tbb.getWidth()/2,-10); 
     } 
    }), 
    init: function(strTitle) { 
    this.subElements = {}; 
    this.subElements.title = new graphiti.shape.basic.Label(strTitle); 
    this.addFigure(this.subElements.title, new this.TitleLocator(this)); 

    this.calculateSize(); 
    } 
} 

这是多么错?

+0

此外,你的子元素本身可以有子元素。 – Zerzio

相关问题