Skip to content

Commit

Permalink
fix: fix multiple overlay style error.
Browse files Browse the repository at this point in the history
  • Loading branch information
liihuu committed Nov 5, 2023
1 parent 3380a19 commit 846d28d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/component/Overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Precision from '../common/Precision'
import { OverlayStyle } from '../common/Options'
import { MouseTouchEvent } from '../common/SyntheticEvent'

import { clone, merge } from '../common/utils/typeChecks'
import { clone, isNumber, merge } from '../common/utils/typeChecks'

import TimeScaleStore from '../store/TimeScaleStore'

Expand Down Expand Up @@ -349,7 +349,7 @@ export default abstract class OverlayImp implements Overlay {
onSelected, onDeselected
} = overlay
this.name = name
this.totalStep = (totalStep === undefined || totalStep < 2) ? 1 : totalStep
this.totalStep = (!isNumber(totalStep) || totalStep < 2) ? 1 : totalStep
this.lock = lock ?? false
this.visible = visible ?? true
this.zLevel = zLevel ?? 0
Expand All @@ -359,7 +359,7 @@ export default abstract class OverlayImp implements Overlay {
this.mode = mode ?? OverlayMode.Normal
this.modeSensitivity = modeSensitivity ?? 8
this.extendData = extendData
this.styles = styles ?? {}
this.styles = clone(styles ?? {})
this.createPointFigures = createPointFigures ?? null
this.createXAxisFigures = createXAxisFigures ?? null
this.createYAxisFigures = createYAxisFigures ?? null
Expand Down

1 comment on commit 846d28d

@liihuu
Copy link
Member Author

@liihuu liihuu commented on 846d28d Nov 5, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.