Giter Site home page Giter Site logo

Comments (12)

lepinekong avatar lepinekong commented on July 24, 2024

I think I found a culprit: weirdly it cannot even attach a component when there is even a single line whereas it works with a rectangle.

from figma-reattache-instance.

renancamm avatar renancamm commented on July 24, 2024

@lepinekong Do you know how to fix it?

from figma-reattache-instance.

lepinekong avatar lepinekong commented on July 24, 2024

@renancamm I'm reading the source code trying to understand how it works for now :^)

from figma-reattache-instance.

glebsexy avatar glebsexy commented on July 24, 2024

I don't know what the issue is here, but I know it doesn't happen with my Master plugin (paid, with a free trial), a part of code from which is contributed to this repository (but it was greatly improved afterwards). It works a bit differently and you can attach an object to component in two steps:

  1. Select one Instance or Master Component. Run “Save or Attach to Saved Master” command, the plugin will remember selected Component.
  2. Select any number of other objects (but you need at least two if they are Instances) you want to turn into Instances of the saved Component.
  3. Run the same command (Alt + Cmd/Ctrl + P if in the same file).
  4. All objects will be replaced with Instances of the previously selected Component, keeping overrides where possible.

It's made this way so unlike Reattach instance it doesn't search the whole file for components which could take forever on large files. Also works with Team Libraries so you can move components between files. Hope it helps and let me know if you have any questions!

from figma-reattache-instance.

lepinekong avatar lepinekong commented on July 24, 2024

@zyumbik thanks a lot for your instructions, that should help. I'm creating a kit for french students as you know most are poor so they can only use free plugin so I'll try to debug but that's weird it works with all shapes except lines theorically that shouldn't be a special case ;)

Your paid plugin is interesting also, I'll probably buy it.

from figma-reattache-instance.

glebsexy avatar glebsexy commented on July 24, 2024

@lepinekong if by any chance a generous discount for students would help, I would be happy to provide it, especially if it would be a bulk purchase.

Yeah, that sounds super weird. Are you sure it's the lines that are stopping the plugin? I fixed about 20 bugs in Master and none were related to lines. Wait, actually one was! It was caused by the fact that lines have 0 height and you can't assign height of 0 to any objects.

from figma-reattache-instance.

lepinekong avatar lepinekong commented on July 24, 2024

@zyumbik I don't have 0 height and it's even crazier than I thought: in some cases it works in other cases it takes forever whereas I can see no difference have joined the file :)
reattach-lines
reattach-lines.zip

from figma-reattache-instance.

glebsexy avatar glebsexy commented on July 24, 2024

@lepinekong well, lines do have the height of 0. But it doesn't mean it's the cause of the problem, it's just one of the things I had to fix in Master, otherwise it crashed. I think the issue here could be in the search algorithm though. This is the only part of code which could take forever to do I believe.

from figma-reattache-instance.

lepinekong avatar lepinekong commented on July 24, 2024

@zyumbik oops didn't realize I did set to 0 because it wasn't on purpose I thought it was 0.5 or did I on purpose I don't remember why :)
Now found an other case this time on a rectangle and which not 0 on w or h:
reattach-instance
reattach-instance.zip

I cannot reattach border:right/0

from figma-reattache-instance.

lepinekong avatar lepinekong commented on July 24, 2024

@lepinekong well, lines do have the height of 0. But it doesn't mean it's the cause of the problem, it's just one of the things I had to fix in Master, otherwise it crashed. I think the issue here could be in the search algorithm though. This is the only part of code which could take forever to do I believe.

confirm it was due to h=0, I set to 0.5 I can reattach

from figma-reattache-instance.

lepinekong avatar lepinekong commented on July 24, 2024

@zyumbik found why for the other case: I have an empty text field (this was on purpose) so will use a space instead ;)

Thanks.

from figma-reattache-instance.

lepinekong avatar lepinekong commented on July 24, 2024

I will close issue as it is minor finally.

from figma-reattache-instance.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.