We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题描述 自定义HTML节点需要设置宽高,有没有可以节点自适应大小的方案?
场景 我希望我的节点中有一个按钮,点击按钮可以添加一行数据, 如果行数超出代码中设置的260px,超出的部分将会被隐藏,希望可以根据内容自适应宽高
class VueHtmlNodeModel extends HtmlNodeModel { setAttributes() { this.width = 280; this.height = 260; this.text.editable = false; this.inputData = this.text.value; } getOutlineStyle() { const style = super.getOutlineStyle(); style.stroke = "none"; style!.hover!.stroke = "none"; return style; } getDefaultAnchor() { return []; } getData() { const data = super.getData(); data.text!.value = this.inputData; return data; } }
Originally posted by @balabll in #1338
The text was updated successfully, but these errors were encountered:
触发新增->获取元素的预设宽高或者通过DOM获取新增元素高度->更新节点宽高
Sorry, something went wrong.
https://codesandbox.io/s/logicflow-base15-forked-rmrtxf?file=/step_15_sqlNode/index.js
看下这个示例是否符合预期呢
@boyongjiong @wumail 感谢两位的解答和例子
No branches or pull requests
问题描述
自定义HTML节点需要设置宽高,有没有可以节点自适应大小的方案?
场景
我希望我的节点中有一个按钮,点击按钮可以添加一行数据, 如果行数超出代码中设置的260px,超出的部分将会被隐藏,希望可以根据内容自适应宽高
Originally posted by @balabll in #1338
The text was updated successfully, but these errors were encountered: