Reputation: 21
I build a paper and graph with jointjs v3.1.1, but as you can see the onmouseup does not work, it is so wired . it works well when I change back to jointjs v1.0.3. I made codes below to test. when using jointjs v1.0.3. the codes alert 'hello' after click anywhere of the webpage. but when changing to jointjs v3.1.1. the codes alert'hello' only when not clicking the paper. but it does work if you click the area without paper. so does anyone knows what's wrong with it ?
var graph = new joint.dia.Graph; //主界面
var paper = new joint.dia.Paper({
el : $('#paper'),
width : 800,
height : 200,
gridSize : 1,
model : graph,
background: {
color: '#ff0000'
}
});
onmousedown = function(e) {
};
onmouseup = function(e){
alert("hello");
};
Upvotes: 0
Views: 116
Reputation: 125
I tried blank:pointerup and it wokred fine
paper.on('blank:pointerup', function (cell) {
alert("hello");
});
Upvotes: 1