mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-28 17:12:32 +00:00
zwave_neighborlist.js: do not go to details after drag (Forum #91394)
git-svn-id: https://svn.fhem.de/fhem/trunk@18055 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d085003684
commit
8b6e97ba9e
@ -104,7 +104,7 @@ zw_draw(fnRet, width, height)
|
|||||||
|
|
||||||
svg += '</svg>';
|
svg += '</svg>';
|
||||||
|
|
||||||
var ox, oy, o;
|
var ox, oy, o, dragged;
|
||||||
$("#ZWDongleNrSVG")
|
$("#ZWDongleNrSVG")
|
||||||
.css({width:width, height:height})
|
.css({width:width, height:height})
|
||||||
.html(svg);
|
.html(svg);
|
||||||
@ -134,8 +134,10 @@ zw_draw(fnRet, width, height)
|
|||||||
.bind('mousedown', function(e) {
|
.bind('mousedown', function(e) {
|
||||||
o = h[$(e.target).parent().attr("data-name")];
|
o = h[$(e.target).parent().attr("data-name")];
|
||||||
ox = o.x; oy = o.y;
|
ox = o.x; oy = o.y;
|
||||||
|
dragged = false;
|
||||||
})
|
})
|
||||||
.bind('drag', function(e, ui) {
|
.bind('drag', function(e, ui) {
|
||||||
|
dragged = true;
|
||||||
var p = ui.position, op = ui.originalPosition;
|
var p = ui.position, op = ui.originalPosition;
|
||||||
o.x = ox + (p.left-op.left);
|
o.x = ox + (p.left-op.left);
|
||||||
o.y = oy + (p.top -op.top);
|
o.y = oy + (p.top -op.top);
|
||||||
@ -148,6 +150,7 @@ zw_draw(fnRet, width, height)
|
|||||||
zw_adjustLines(h, o.name);
|
zw_adjustLines(h, o.name);
|
||||||
});
|
});
|
||||||
$("svg.zw_nr g text").click(function(){
|
$("svg.zw_nr g text").click(function(){
|
||||||
|
if(!dragged)
|
||||||
location.href = FW_root+"?detail="+$(this).text();
|
location.href = FW_root+"?detail="+$(this).text();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user