是否可以在graphiti.js中创建嵌套对象图形?
发布于 2012-10-31 19:52:36
然而,我能够使用装饰方法来做到这一点,而且它工作得很好。
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();
}
}这有什么不对的?
发布于 2012-07-01 06:54:22
目前不支持嵌套图形。
抱歉的
安德烈亚斯
https://stackoverflow.com/questions/11272557
复制相似问题