Remove performance modes (for now)

This commit is contained in:
Steve Ruiz 2021-12-27 12:38:30 +00:00
parent d1fb7d1115
commit 297486bb34
9 changed files with 9 additions and 9 deletions

View file

@ -2,5 +2,5 @@ import { TLPerformanceMode } from '@tldraw/core'
import type { Action } from 'state/constants'
export const setTransformPerformanceMode: Action = (data) => {
data.performanceMode = TLPerformanceMode.TransformSelected
data.performanceMode = undefined
}

View file

@ -2,5 +2,5 @@ import { TLPerformanceMode } from '@tldraw/core'
import type { Action } from 'state/constants'
export const setTranslatePerformanceMode: Action = (data) => {
data.performanceMode = TLPerformanceMode.TranslateSelected
data.performanceMode = undefined
}

View file

@ -18,7 +18,7 @@ import { TLPerformanceMode, Utils } from '@tldraw/core'
export class ArrowSession extends BaseSession {
type = SessionType.Arrow
performanceMode = TLPerformanceMode.TransformSelected
performanceMode = undefined
status = TDStatus.TranslatingHandle
newStartBindingId = Utils.uniqueId()
draggedBindingId = Utils.uniqueId()

View file

@ -6,7 +6,7 @@ import { BaseSession } from '../BaseSession'
export class DrawSession extends BaseSession {
type = SessionType.Draw
performanceMode = TLPerformanceMode.TransformSelected
performanceMode = undefined
status = TDStatus.Creating
topLeft: number[]
points: number[][]

View file

@ -7,7 +7,7 @@ import { TLPerformanceMode } from '@tldraw/core'
export class HandleSession extends BaseSession {
type = SessionType.Handle
performanceMode = TLPerformanceMode.TransformSelected
performanceMode = undefined
status = TDStatus.TranslatingHandle
commandId: string
topLeft: number[]

View file

@ -8,7 +8,7 @@ import type { TldrawApp } from '../../internal'
export class RotateSession extends BaseSession {
type = SessionType.Rotate
status = TDStatus.Transforming
performanceMode = TLPerformanceMode.TranslateSelected
performanceMode = undefined
delta = [0, 0]
commonBoundsCenter: number[]
initialAngle: number

View file

@ -18,7 +18,7 @@ type SnapInfo =
export class TransformSession extends BaseSession {
type = SessionType.Transform
performanceMode = TLPerformanceMode.TransformSelected
performanceMode = undefined
status = TDStatus.Transforming
scaleX = 1
scaleY = 1

View file

@ -26,7 +26,7 @@ type SnapInfo =
export class TransformSingleSession extends BaseSession {
type = SessionType.TransformSingle
status = TDStatus.Transforming
performanceMode = TLPerformanceMode.TransformSelected
performanceMode = undefined
transformType: TLBoundsEdge | TLBoundsCorner
scaleX = 1
scaleY = 1

View file

@ -48,7 +48,7 @@ type SnapInfo =
}
export class TranslateSession extends BaseSession {
performanceMode = TLPerformanceMode.TranslateSelected
performanceMode = undefined
type = SessionType.Translate
status = TDStatus.Translating
delta = [0, 0]