kimoa / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
3 stars 0 forks source link

Grid is invisible when background is black #895

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Code enhancement with svn diff below.

What steps will reproduce the problem?
1. Set background to black using svgEditor.setConfig({ bkgd_color: '#000'});
2. Load svg-edit and turn on the background. 

What is the expected output? What do you see instead?
I expected to see the grid, but did not. In fact, it is there; but the 
background and grid are both black.

In what browser did you experience this problem? (ALL, Firefox, Opera, etc)
All

In what version of SVG-edit does the problem occur? (Latest trunk, 2.5.1,
etc)
Latest trunk

Please provide any additional information below.

I updated my repo to add curConfig.gridColor. I've attached an svn diff.

I had some questions about my solution:

ONE: 
curConfig.initFill[color] doesn't have the '#' prefix, but
curConfig.bkgd_color does. What's the preference? My preference is to 
include the '#' when specifying hex colors so named colors work too. 

TWO: 
I added curConfig.gridColor to svg-editor.js, but it's only used in 
the ext-grid.js. If would be nice if it was only defined in the 
extension, but then I think Editor.setConfig() ignores it because 
it's not in the default list.

Perhaps each extension should register it's own config variables with 
svg-editor.js and provide a default. That way extensions can be added without 
updating svg-editor.js. Maybe that mechanism exists and I just didn't come 
across it.

Thanks,
Flint

Original issue reported on code.google.com by FlintOBr...@gmail.com on 18 Jan 2012 at 3:22

Attachments:

GoogleCodeExporter commented 8 years ago
In "What steps to reproduce", the second line should read:
2. Load svg-edit and turn on the grid.

Original comment by FlintOBr...@gmail.com on 18 Jan 2012 at 5:33

GoogleCodeExporter commented 8 years ago
Thanks for your patch.
Grid color can now be changed in the bottom right of the option menu.

You're right about point 2, we'll need to find a more elegant way to handle 
this issue in the future.

Original comment by delapou...@gmail.com on 19 Feb 2013 at 9:09