-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release #1421
Conversation
* fix: return empty object for globalthis * chore: commit changeset
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
import { | ||
Canvas, | ||
CanvasEvent, | ||
Circle, | ||
Rect, | ||
Text, | ||
Path, | ||
runtime, | ||
} from '@antv/g'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
runtime, | ||
} from '@antv/g'; | ||
import { Renderer as CanvasRenderer } from '@antv/g-canvas'; | ||
import * as lil from 'lil-gui'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
@@ -184,6 +184,11 @@ export class Canvas extends EventTarget implements ICanvas { | |||
canvasHeight = height || getHeight(canvas) || canvas.height / dpr; | |||
} | |||
|
|||
// override it in runtime | |||
if (offscreenCanvas) { | |||
runtime.offscreenCanvas = offscreenCanvas; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果页面存在 多个 canvas ,这里会不会覆盖?
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge