Commit 97dd4c84 authored by Romain Loth's avatar Romain Loth

deselect on click in the bg (except if dragging)

parent b2bb0ba6
......@@ -634,6 +634,20 @@ TinaWebJS = function ( sigmacanvas ) {
// just before, at click event
})
// when click in the empty background
// ==================================
TW.partialGraph.bind('clickStage', function(e) {
// console.log("clickStage event e", e)
if (! e.data.captor.isDragging
&& Object.keys(selections).length
&& ! cursor_size) {
// we clear selections and all its effects
cancelSelection(false);
}
})
// for all TW.cam.goTo (move/zoom) events
// ===============
var zoomTimeoutId = null
......@@ -643,6 +657,14 @@ TinaWebJS = function ( sigmacanvas ) {
// ---------------------------------------------------------------------
// POSS: bind to captors (0=>mouse, 1=>touch)
// TW.rend.captors[0].bind('mousemove', function(e) {
// console.log("mousemove event e", e.data.node)
//
// })
// ---------------------------------------------------------------------
// raw events (non-sigma): handlers attached to the container
// ==========
$("#sigma-contnr")
......
......@@ -331,7 +331,7 @@ if(RES["OK"]) {
console.log("level: "+level);
console.log("selections: ");
console.log(sels)
console.log("selections2: ");
console.log("selections len: ");
console.log(sels.length)
console.log("opposites: ");
console.log(oppos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment