I made a slider so the user can choose the preferred grid spacing. I was able to get the grid functioning very well but the dots drawed on screen wont change accordingly. I figured out where the values are saved and changed those. That did spread out the dots but the snapping wont match with setting the workspace up with this spacing.
Here is the code I wrote:
workspace.spacing = newSpacing;
workspace.options.gridOptions.spacing = newSpacing;
workspace.options.gridPattern.width.baseVal.value = newSpacing;
workspace.options.gridPattern.height.baseVal.value = newSpacing;
Is there a better way or a function I missed to do this?
Magnet