EEmmanuel7 / jsvectoreditor

Automatically exported from code.google.com/p/jsvectoreditor
0 stars 0 forks source link

Make the non-filled shape selected on inner click #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create the shape, set the Fill to None
2. Click inside it - the shape is not selected
3. Click on the border - the shape is selected

What is the expected output? What do you see instead?
The behavior is logic from the programmatic point of view ("if the shape is 
empty inside, it shouldn't be selected"), but it is not convenient, 
especially with the thin-stroke shapes.
Also, for the line objects of 1-2 px width it might be good to select them 
when the click is made near it (i.e. if the distance from the mouse down 
point to the line border is not grater than 1 px). But this is definitely 
not trivial.

Please provide any additional information below.
May be using o% fill instead of None will automatically solve the problem?

Original issue reported on code.google.com by emiro...@gmail.com on 30 Dec 2009 at 2:12

GoogleCodeExporter commented 9 years ago
From the SVG point of view, no event fires when clicked inside.

I'll add 0% fill to the options for opacity, but None fill won't be explicitly 
aliased with 0%.

Original comment by Antimatter15 on 30 Dec 2009 at 5:55

GoogleCodeExporter commented 9 years ago
I don't request the 0 fill to be equivalent to None fill.
I just want any way to have the shape transparent while selectable by clicking 
inside
as appears for filled shapes.

Original comment by emiro...@gmail.com on 3 Jan 2010 at 4:30

GoogleCodeExporter commented 9 years ago
Well, no DOM event fires with None fills, I can't do anything about that, ask 
the 
browser vendors.

Original comment by Antimatter15 on 3 Jan 2010 at 9:59

GoogleCodeExporter commented 9 years ago
Ahm, seems you don't understand me.
I have just added the 00% option to the opacity drop-down. This is not None 
fill,
it's zero opacity fill with some color.
And it made the trick - the shape is transparent, while clicking inside selects 
it.
And this is exactly what I wanted.

Original comment by emiro...@gmail.com on 3 Jan 2010 at 10:15

GoogleCodeExporter commented 9 years ago
So is your problem fixed?

Original comment by Antimatter15 on 4 Jan 2010 at 12:56

GoogleCodeExporter commented 9 years ago
Yes

Original comment by emiro...@gmail.com on 4 Jan 2010 at 8:33

GoogleCodeExporter commented 9 years ago

Original comment by Antimatter15 on 4 Jan 2010 at 7:12