Skip to content
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

[bug] Strange rectangle is created after creating PaintStyle #17

Open
ardov opened this issue Sep 29, 2021 · 0 comments
Open

[bug] Strange rectangle is created after creating PaintStyle #17

ardov opened this issue Sep 29, 2021 · 0 comments

Comments

@ardov
Copy link

ardov commented Sep 29, 2021

After using PaintStyle() the Scripter also creates a rectangle. This rectangle seems to be connected with paint style so I can't delete it without deleting the style.

Steps to reproduce:

Run this script:

PaintStyle({
  name: 'Cyan',
  paints:[
    {
      type: 'SOLID',
      visible: true,
      opacity:  1,
      blendMode: 'NORMAL',
      color: { r: 0, g: 1, b: 1 },
    },
  ]
})

Expected behavior:

  • Local paint style is created

Current behavior:

  • Local paint style is created
  • Also rectangle is created at coordinates 0:0. This rectangle has the same color as the paint style but not linked to it. And here is the strange part, if you delete this rectangle, the paint style will also be deleted 🤯

There will also be an error in console after deleting that rectangle: "Uncaught Error: "Encountered style on visible canvas" in softDeleteNode (FGSceneGraph.cpp)".

By the way figma.createPaintStyle() seems to work correctly, this bug only happens with PaintStyle()

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

No branches or pull requests

1 participant