Skip to content

Commit 53897c8

Browse files
committed
force layout: properly UNSET the .fixed bits: user may be using further bits and those should be kept intact.
1 parent 39347b4 commit 53897c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/layout/force.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,15 +303,15 @@ function d3_layout_forceDragstart(d) {
303303
}
304304

305305
function d3_layout_forceDragend(d) {
306-
d.fixed &= 1; // unset bits 2 and 3
306+
d.fixed &= ~6; // unset bits 2 and 3
307307
}
308308

309309
function d3_layout_forceMouseover(d) {
310310
d.fixed |= 4; // set bit 3
311311
}
312312

313313
function d3_layout_forceMouseout(d) {
314-
d.fixed &= 3; // unset bit 3
314+
d.fixed &= ~4; // unset bit 3
315315
}
316316

317317
function d3_layout_forceAccumulate(quad, alpha, charges) {

0 commit comments

Comments
 (0)