Commit 4b821dcd authored by techird's avatar techird

dev

parent e5ffeea9
......@@ -65,11 +65,21 @@ kity.extendClass(KityMinder, {
var x = current.getData('x') || 0,
y = current.getData('y') || 0;
rc.setTransform(new kity.Matrix().translate(x, y));
if(!rc.textContainer) {
rc.textContainer = new kity.Text();
rc.addShape(rc.textContainer);
if(!rc.rect) {
rc.rect = new kity.Rect();
rc.addShape(rc.rect);
rc.rect.fill('#eee');
rc.rect.setRadius(5);
}
rc.textContainer.setContent(current.getData('text') || '');
if(!rc.text) {
rc.text = new kity.Text();
rc.addShape(rc.text);
}
rc.text.setContent(current.getData('text') || '');
var box = rc.text.getRenderBox();
rc.rect.setPosition(box.x - 5, box.y - 5);
rc.rect.setSize(box.width + 10, box.height + 10);
});
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment