公告
财富商城
积分规则
提问
发文
2019-09-14 03:15发布
兄弟一词,经得起流年.
Can anyone tell me how to wrap lengthy text inside rectangle in JointJS.
Thanks in advance
You can use either "TextBlock" or if you trying to create a custom element you can write like this
joint.shapes.devs.testModel = joint.shapes.basic.TextBlock.extend( {
markup: ['<g class="rotatable"><g class="scalable"><rect class="body"/><rect class="leftthick"/></g>', joint.env.test('svgforeignobject') ? '<foreignObject class="fobj"><body xmlns="http://www.w3.org/1999/xhtml"><div class="content"/></body></foreignObject>' : '<text class="content"/>', '<image/><text class="label"/><g class="inPorts"/><g class="outPorts"/>', '</g>'].join(''), defaults: joint.util.deepSupplement({
最多设置5个标签!
You can use either "TextBlock" or if you trying to create a custom element you can write like this
joint.shapes.devs.testModel = joint.shapes.basic.TextBlock.extend( {