jointjs 笔记 6 --- 禁止在手动连接节点时,关系图中选中文本的效果

未禁止效果如下,在鼠标移动的时候节点上的文字会有选中的颜色背景,如何去除呢

HTML

<div class="model-box" id="model" ref="model" ></div>

在mounted中,对这个元素进行选中禁止

document.getElementById('model').onselectstart = function() { return false}; 
document.getElementById('model').unselectable  = 'on';
document.getElementById('model').style.MozUserSelect = 'none'; // 禁止火狐选中文字

 完成效果如下

原文地址:https://www.cnblogs.com/fyjz/p/14487418.html