Skip to content

Allow passing kwargs to Electron window (fixes #122) - #272

Open
rainerrodrigues wants to merge 1 commit into
rdeits:masterfrom
rainerrodrigues:electron-resize
Open

Allow passing kwargs to Electron window (fixes #122)#272
rainerrodrigues wants to merge 1 commit into
rdeits:masterfrom
rainerrodrigues:electron-resize

Conversation

@rainerrodrigues

Copy link
Copy Markdown

Description

This PR allows users to pass keyword arguments through open(vis) down to the Electron window instantiation, resolving issue #122.

Changes Made

  • Added ; kwargs... to Base.open(core::MeshCat.CoreVisualizer, w::Electron.Application) in ext/ElectronExt.jl.
  • Forwarded kwargs... into Electron.Window().
  • The main Base.open method in src/servers.jl was already configured to forward kw..., so this change seamlessly completes the pipeline.

Example Usage:

using MeshCat, Electron
vis = Visualizer()
app = Electron.Application()
open(vis, app; options=Dict("width" => 1920, "height" => 1080))

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