Have a toggle between the old snapGrid and the new one
See original GitHub issuePlease describe the feature that you want to propose
I would like a toggle between the old snapGrid and the new one. I was using the old one in my code and with this update it broke everything. I understand why users would like the snapGrid[10, 10] to move in increments of 10 based off of 0, 0. But I also like the idea of moving over 545 for where it is now, but snapGrid[545, 30] now does it in reference to 0, 0. That is what I use in my code. If things are not aligned at 0, 0. it completely throws off the dragging feature. I have made a temporary fix :
const handleDragStart = (node, event) => {
// 545 is what the snapGrid is set to and where the node goes to on drag
if (node.position.x == 545){
// 625 is the actual node.position.x that I want it to be at.
node.position.x = 625
}
}
This is temporary and only works for some of my nodes. I hope that this feature can be created so I don’t have to look into a more permanent fix. I believe that the toggle could look something like: snapGridAtZero={true/false}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Setting snap grid spacings - Custom IC Design
Hi, I am using a skill function to redefine my X and Y snap spacings - because using "e" and filling in the...
Read more >Working with the Cursor-Snap System in Altium Designer
Select View » Toggle Units (or press the Q shortcut) to switch the design space units between imperial and metric. The current Snap...
Read more >snap,grid, ortho mode, polar tracking, object snap ... - YouTube
Learn AutoCAD for free using this step-by-step AutoCAD tutorial series containing nearly 40 videos with lesson files ...
Read more >Grids and Units | Online Documentation for Altium Products
Altium TechDocs are online documentation for Altium products, providing the basic information you need to get the most out of our tools.
Read more >Right-Suite® Universal: New Features - Wrightsoft
RSU® is the #1 HVAC load calculation and duct design software to help HVAC ... An option has been added to the “Options”...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@WillBaker2017 I don’t like it 😄 The old version was broken, because it was not one grid but multiple ones. If you want a special snap behaviour you can use
onNodesChange
or alter nodes when dragging is false for example.@wardoost @moklick I like that a lot