自定义HTML节点可以自适应宽高吗
#1338
-
问题描述 场景 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;
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
wumail
Sep 25, 2023
Replies: 1 comment
Answer selected by
wumail
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#1340