Skip to content

Commit

Permalink
remove pause and unpause culling, rename uncull
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonreid committed Oct 27, 2023
1 parent ba7c107 commit af6939f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions src/objects/culling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ export function stopCulling(): void {
callback = null
}

export function pauseCulling(): void {
if (cullInstance) {
cullInstance.uncull()
}
}

export async function cull(): Promise<void> {
if (!cullInstance) {
return
Expand All @@ -54,7 +48,10 @@ export async function cull(): Promise<void> {
cullInstance.cull(application.renderer.screen)
}

export async function resumeCulling(): Promise<void> {
export function uncull(): void {
if (cullInstance) {
cullInstance.uncull()
}
}

export async function waitForCull(): Promise<Cull> {
Expand Down
4 changes: 2 additions & 2 deletions src/objects/viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { RunGraphProps } from '@/models/RunGraph'
import { ViewportDateRange } from '@/models/viewport'
import { waitForApplication } from '@/objects/application'
import { waitForConfig } from '@/objects/config'
import { pauseCulling } from '@/objects/culling'
import { uncull } from '@/objects/culling'
import { emitter, waitForEvent } from '@/objects/events'
import { waitForScale } from '@/objects/scale'
import { waitForScope } from '@/objects/scope'
Expand Down Expand Up @@ -63,7 +63,7 @@ export async function centerViewport({ animate }: CenterViewportParameters = {})
throw new Error('Nodes container not found')
}

pauseCulling()
uncull()
const { x, y, width, height } = container.getLocalBounds()
const scale = viewport.findFit(width, height)

Expand Down

0 comments on commit af6939f

Please sign in to comment.