模态 bootstrap 内的 JointJs 图?
JointJs graph inside a modal bootstrap?
我将 JointJs 与图表和 joint.dia.Paper
一起使用
我在我网站的许多视图中都使用了这张图。
var graph = new joint.dia.Graph();
// define page to draw in
var paper = new joint.dia.Paper({
el: $('#graphDefault'),
width: 500,
height: 500,
gridSize: 10,
model: graph,
interactive: false,
});
我的图表在原生中是正确的
页面,但如果我想在模型 bootstrap 框中使用它,
视图不正确,默认有比例。
矩形太大,所有的比例因子都是 (100, 70)。
如何禁用模态框内容内的缩放?
您需要将内容设置为在DOM内容中可见,否则图形无法正确呈现。
我将 JointJs 与图表和 joint.dia.Paper
一起使用我在我网站的许多视图中都使用了这张图。
var graph = new joint.dia.Graph();
// define page to draw in
var paper = new joint.dia.Paper({
el: $('#graphDefault'),
width: 500,
height: 500,
gridSize: 10,
model: graph,
interactive: false,
});
我的图表在原生中是正确的 页面,但如果我想在模型 bootstrap 框中使用它, 视图不正确,默认有比例。
矩形太大,所有的比例因子都是 (100, 70)。
如何禁用模态框内容内的缩放?
您需要将内容设置为在DOM内容中可见,否则图形无法正确呈现。