标签: rappid

IE11 - 对象不支持属性或方法“包含”

使用Rappid我在 IE11 控制台中遇到错误:

Object doesn't support property or method 'contains'
Run Code Online (Sandbox Code Playgroud)

此错误来自没有该方法的 SVGElement。Chrome 中的相同代码有效。

好像我需要填充工具为这种缺少方法,但根据MDN文档上包含它是从IE9支持和起来,但不支持SVGElement

编辑:这是一个片段 - 尝试在 Chrome 和 IE11 中运行

Object doesn't support property or method 'contains'
Run Code Online (Sandbox Code Playgroud)
const joint = window.joint;

let graph = new joint.dia.Graph;

let paper = new joint.dia.Paper({
    width: 1500,   /*200,*/
    height: 1500,  /*200,*/
    el: $('.paper-container'),
    gridSize: 1,
    drawGrid: true,
    model: graph,
    //defaultLink: new joint.shapes.app.Link,
    //defaultConnectionPoint: joint.shapes.app.Link.connectionPoint,
    interactive: { linkMove: false }
});

$('.paper-container').append(paper.el);
paper.render();
    
var member = function(x, y, …
Run Code Online (Sandbox Code Playgroud)

javascript svg polyfills internet-explorer-11 rappid

5
推荐指数
1
解决办法
3421
查看次数

在纸上取消突出显示所有 cellViews - jointjs

我们最近添加了 Jointjs 的突出显示功能,以向用户显示当前突出显示和选择的单元格视图。但是,如果用户点击外面,我们想要取消突出显示在纸上绘制的所有 cellView(s)。在调查了官方文档后,我们最终无法找到满足我们要求的解决方案。

突出显示 cellView(s) 的代码是:

this.paper.on('cell:pointerclick', (cellView: any) => {
    cellView.highlight();
});
Run Code Online (Sandbox Code Playgroud)

javascript jointjs rappid

1
推荐指数
1
解决办法
523
查看次数