File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,7 @@ function createScene(options) {
337337 var numPick = pickBuffers . length
338338 var numObjs = objects . length
339339 var prevObj = selection . object
340+
340341 selection . distance = Infinity
341342 selection . mouse [ 0 ] = x
342343 selection . mouse [ 1 ] = y
@@ -346,7 +347,7 @@ function createScene(options) {
346347
347348 var change = false
348349
349- if ( buttons ) {
350+ if ( buttons && prevButtons ) {
350351 mouseRotating = true
351352 } else {
352353 if ( mouseRotating ) {
@@ -367,6 +368,7 @@ function createScene(options) {
367368 }
368369 var objPick = obj . pick ( result )
369370 if ( objPick ) {
371+ selection . buttons = buttons
370372 selection . screen = result . coord
371373 selection . distance = result . distance
372374 selection . object = obj
@@ -380,6 +382,7 @@ function createScene(options) {
380382 }
381383 }
382384 }
385+
383386 if ( prevObj && prevObj !== selection . object ) {
384387 if ( prevObj . highlight ) {
385388 prevObj . highlight ( null )
You can’t perform that action at this time.
0 commit comments