Skip to content

Commit

Permalink
Add selection fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dy committed Apr 30, 2018
1 parent 7e29a41 commit c9b6177
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ Scatter.prototype.draw = function (...args) {
args = args[0]
}

// FIXME: remove once https://github.com/regl-project/regl/issues/474 resolved
this.regl._refresh()

if (args.length) {
for (let i = 0; i < args.length; i++) {
this.drawItem(i, args[i])
Expand All @@ -252,7 +255,7 @@ Scatter.prototype.draw = function (...args) {

// draw specific scatter group
Scatter.prototype.drawItem = function (id, els) {
let { groups, } = this
let { groups } = this
let group = groups[id]

// debug viewport
Expand Down Expand Up @@ -342,10 +345,7 @@ Scatter.prototype.getMarkerDrawOptions = function(markerId, group, elements) {
markerTexture: this.markerTextures[markerId],
activation: elements ? selectionBuffer : activation[markerId],
offset: from,
count: to - from,

// send tree elements
elements: group.elements
count: to - from
}))
}

Expand Down

2 comments on commit c9b6177

@etpinard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

peek 2018-05-01 14-49

Please sign in to comment.