Comments (12)
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.
@lepinekong Do you know how to fix it?
from figma-reattache-instance.
@renancamm I'm reading the source code trying to understand how it works for now :^)
from figma-reattache-instance.
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:
- Select one Instance or Master Component. Run “Save or Attach to Saved Master” command, the plugin will remember selected Component.
- 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.
- Run the same command (Alt + Cmd/Ctrl + P if in the same file).
- 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.
@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.
@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.
@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.zip
from figma-reattache-instance.
@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.
@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.zip
I cannot reattach border:right/0
from figma-reattache-instance.
@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.
@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.
I will close issue as it is minor finally.
from figma-reattache-instance.
Related Issues (13)
- Color bug HOT 1
- prototype link lost
- Relink to new master?
- After reattaching the instances moves HOT 3
- Add UI to manually select a component to reattach to HOT 12
- Border width override isn't applied upon reattachment. HOT 1
- Displays "Running Reattach Instance" forever HOT 4
- Features suggestion
- Improve code documentation by adding comments
- Add more user-friendly messages
- Maintenance of the project HOT 10
- Color bug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from figma-reattache-instance.