qianzhu
V2EX  ›  Electron

electron svg 会保留 ‘痕迹’

  •  
  •   qianzhu · Dec 29, 2023 · 1771 views
    This topic created in 886 days ago, the information mentioned may be changed or developed.

    我在主窗口设置了 win.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: false }),然后在页面中使用 svg 创建了一个可以写字的白板。

    我发现,我在 A 窗口画了一条线,在 B 窗口清除掉这条线,B 窗口会留下那条线的痕迹。反过来在 B 中画,A 中清除也是一样会留有痕迹。

    electron: 25.6.0 MacOS x86 Sonoma 14.2.1

    关键代码: https://gist.github.com/syt-honey/3823d059e16dbe8dfc150b18169e822a

    痕迹: https://user-images.githubusercontent.com/36325249/293312786-fb09afe3-0ac4-45f4-aa9e-4318251c4444.png

    qianzhu
        1
    qianzhu  
    OP
       Aug 28, 2025
    new BrowserWindow 的时候设置 hasShadow 为 false 即可
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3975 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 10:17 · PVG 18:17 · LAX 03:17 · JFK 06:17
    ♥ Do have faith in what you're doing.