Feat:阻止非富文本模式时的节点文本可被选中
This commit is contained in:
parent
fa7761b5a3
commit
d8a88f94d7
@ -205,6 +205,10 @@ export const cssContent = `
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
stroke-width: 2;
|
stroke-width: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.smm-text-node-wrap {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
// html自闭合标签列表
|
// html自闭合标签列表
|
||||||
|
|||||||
@ -261,7 +261,8 @@ function createTextNode(specifyText) {
|
|||||||
})
|
})
|
||||||
textArr = textArr.join('\n').split(/\n/gim)
|
textArr = textArr.join('\n').split(/\n/gim)
|
||||||
textArr.forEach((item, index) => {
|
textArr.forEach((item, index) => {
|
||||||
let node = new Text().text(item)
|
const node = new Text().text(item)
|
||||||
|
node.addClass('smm-text-node-wrap')
|
||||||
this.style.text(node)
|
this.style.text(node)
|
||||||
node.y(
|
node.y(
|
||||||
fontSize * noneRichTextNodeLineHeight * index +
|
fontSize * noneRichTextNodeLineHeight * index +
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user