mirror of
https://github.com/apache/nifi.git
synced 2025-02-16 06:55:28 +00:00
NIFI-214:
- It appears that the zoom (pan) event is being triggered early on some browser/OS combinations. As a result, a pan of 0px is registering and throwing off deselection (since we want to maintain selection when panning). I am not sure why the events are firing sporadically, but delaying when the panning flag is set seems to have addressed the deselection concerns.
This commit is contained in:
parent
5fbee26054
commit
1da5339a2a
@ -1210,6 +1210,7 @@ nf.Canvas = (function () {
|
||||
return {
|
||||
init: function () {
|
||||
var refreshed;
|
||||
var zoomed = false;
|
||||
|
||||
// define the behavior
|
||||
behavior = d3.behavior.zoom()
|
||||
@ -1217,7 +1218,13 @@ nf.Canvas = (function () {
|
||||
.translate(TRANSLATE)
|
||||
.scale(SCALE)
|
||||
.on('zoom', function () {
|
||||
panning = true;
|
||||
// if we have zoomed, indicate that we are panning
|
||||
// to prevent deselection elsewhere
|
||||
if (zoomed) {
|
||||
panning = true;
|
||||
} else {
|
||||
zoomed = true;
|
||||
}
|
||||
|
||||
// see if the scale has changed during this zoom event,
|
||||
// we want to only transition when zooming in/out as running
|
||||
@ -1250,6 +1257,7 @@ nf.Canvas = (function () {
|
||||
}
|
||||
|
||||
panning = false;
|
||||
zoomed = false;
|
||||
});
|
||||
|
||||
// add the behavior to the canvas and disable dbl click zoom
|
||||
|
Loading…
x
Reference in New Issue
Block a user