Some bad news. It looks like there might've been some unintended side-effects to List com.kitfox.svg.SVGDiagram.pick(Point2D point, List retVec) from the latest changes.
Using the Maven svgSalamander jar, I can get an accurate list of SvgElements under the mouse-click. Current behaviour with svgSlamander-tiny.jar file from 2.0.x, is strange. It appears that clicks are not mapped to the correct position in the SVG Diagram. It's working, since clicking in empty spots of the screen sometimes comes up with the same SVG Elements that I can get with Maven svgSalamander.jar... it's just not working as intended!
So, the "real" rects get mapped into "ghost" rects.
So far I've been able to determine it's not just a translation of the original SVG, so it's not just to do with offsets. The "ghost" rect that I can click on appears bigger than the "real" rect, and sometimes I can't even find any "ghost" rect.
I don't have a minimalist example right now. But I switched my project to Gradle, so it should be relatively easy to get up and running. It will download gradle into your computer, along with dependencies (Apache Pivot + svgSalamander) from the Maven repository. Instructions are:
- Checkout https://github.com/jgmartins/Full-Thrust
- run "gradlew eclipse", (gradlew.bat for Windows) which should create Eclipse projects for FTL-Core, FTL-Server, FTL-Client. If it's not finding dependencies, run "gradlew build" first, and then "gradlew eclipse again"
- Open Eclipse with the workspace inside the Full-Thrust folder that you checked out, then create each of the projects. They should be configured.
- Run org.fullthrust.server.Server first, and then org.fullthrust.client.Client. The run configurations need to be set up so that the working directory (found under the Arguments tab in Run Configurations) is the Full-Thrust folder. Using "$
- Once the client opens, make sure to click one of the buttons for choosing a faction.
- Because of the bug in svgSalamander.jar, the screen will be empty. But some viewBoxes work, as per this bug report! A viewbox that shows the ImageView for me is [DEBUG] Setting viewBox: -275 -204 551 408 (this is debug output in the console). You can pan the image using right-click (which centers the screen on the mouse location) until the image shows up (don't mind the graphics, they are buggy). Now, left-clicking on the rect or on the ships will cause a console message to be printed out with SVG Element IDs found under the mouse. The two nulls are the visible white/blue rect, and MyShipID identifies the ships. This also works when the image is not displaying.
To test 2.0.x svgSalamander-tiny, you can just change the build path for FTL-Client to point at it. There is a copy under FTL-Client/. The image will display correctly (minus some strange scaling under the faction selection screen that might be a bug on my part - not sure!). Clicking now does not "pick" the right SVG Elements under the mouse.
This is complicated, but should get you an interactive example. I'll try to come up with a minimalist example at some point though, unless the cause of this is somehow obvious from the changes made