relation-graphsf-relation在chromium与firefox中表现不一致的解决方法

relation-graph/sf-relation在chromium与firefox中表现不一致的解决方法

先说现象,relation-graph/sf-relation在firefox中会出现无法使用滚轮缩放,而且选中的node节点还会竖着显示而非chromium下的横着显示;

无法滚轮缩放的解决方法,在node_modules/sf-relation/sf-relation.min.common.js搜索,而后在下方增加一行:

image-20221118173224216

node节点竖着显示的解决方法,在node_modules/sf-relation/sf-relation.min.css搜索<.rel-node-selected>,而后把-moz-transform后的样式(下方选中的样式)删除:

image-20221118173349936

原因1:firefox中的滚轮事件不是mouseWheel而是wheel;原因2:样式文件对mozilla做了特殊处理;

猜你喜欢

转载自blog.csdn.net/qq_41575208/article/details/127926928