Skip to content

Conversation

@Justin-ZS
Copy link

Summary

  • Allow dynamic devicePixelRatio updates through the resize() method
  • Add Layer.updateDpr() to keep canvas context dpr in sync

Fix

apache/echarts#21386

Usage

zr.resize({
    width: 800,
    height: 600,
    devicePixelRatio: window.devicePixelRatio
});

Changes

  • Add optional devicePixelRatio parameter to PainterBase.resize() interface
  • Add Layer.updateDpr() method
  • Update Painter.resize() to trigger layer resize on dpr change
  • Expose devicePixelRatio option in ZRender.resize()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant