Skip to content
Snippets Groups Projects
Commit 74990cab authored by Alexander Rose's avatar Alexander Rose
Browse files

repr support for canvas3d.mark

parent a71e1585
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ interface Canvas3D {
animate: () => void
pick: () => void
identify: (x: number, y: number) => Promise<PickingId | undefined>
mark: (loci: Loci, action: MarkerAction) => void
mark: (loci: Loci, action: MarkerAction, repr?: Representation.Any) => void
getLoci: (pickingId: PickingId) => { loci: Loci, repr?: Representation.Any }
readonly didDraw: BehaviorSubject<now.Timestamp>
......@@ -133,10 +133,12 @@ namespace Canvas3D {
return { loci, repr }
}
function mark(loci: Loci, action: MarkerAction) {
function mark(loci: Loci, action: MarkerAction, repr?: Representation.Any) {
let changed = false
reprRenderObjects.forEach((roSet, repr) => {
changed = repr.mark(loci, action) || changed
reprRenderObjects.forEach((_, _repr) => {
if (!repr || repr === _repr) {
changed = _repr.mark(loci, action) || changed
}
})
if (changed) {
// console.log('changed')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment