Skip to content

Commit

Permalink
fix: fix z-index bug when use size-sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Dec 10, 2019
1 parent 59e0875 commit a9478d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/x6/src/graph/viewport-manager.ts
Expand Up @@ -300,13 +300,15 @@ export class ViewportManager extends BaseManager {
if (this.graph.dialect === 'svg') {
const svg = (this.view.getDrawPane() as SVGGElement).ownerSVGElement
if (svg != null) {
svg.style.position = 'relative'
svg.style.minWidth = `${Math.max(1, width)}px`
svg.style.minHeight = `${Math.max(1, height)}px`
svg.style.width = '100%'
svg.style.height = '100%'
}
} else {
const stage = this.view.getStage()!
stage.style.position = 'relative'
stage.style.minWidth = `${Math.max(1, width)}px`
stage.style.minHeight = `${Math.max(1, height)}px`
}
Expand Down

0 comments on commit a9478d9

Please sign in to comment.