relation-graph/sf-relation在chromium与firefox中表现不一致的解决方法
先说现象,relation-graph/sf-relation在firefox中会出现无法使用滚轮缩放,而且选中的node节点还会竖着显示而非chromium下的横着显示;
无法滚轮缩放的解决方法,在node_modules/sf-relation/sf-relation.min.common.js搜索,而后在下方增加一行:
node节点竖着显示的解决方法,在node_modules/sf-relation/sf-relation.min.css搜索<.rel-node-selected>,而后把-moz-transform后的样式(下方选中的样式)删除:
原因1:firefox中的滚轮事件不是mouseWheel而是wheel;原因2:样式文件对mozilla做了特殊处理;